Added test to BaseQuantity and a benchmark for Vectors

This commit is contained in:
AdrienBouvais
2026-04-21 14:19:22 +02:00
parent f2e18da797
commit 52e58829eb
4 changed files with 196 additions and 9 deletions
+1
View File
@@ -82,6 +82,7 @@ pub fn set(self: *Scales, key: Dimension, val: UnitScale) void {
}
pub fn min(comptime s1: Scales, comptime s2: Scales) Scales {
@setEvalBranchQuota(10_000);
var out = Scales.initFill(.none);
for (std.enums.values(Dimension)) |dim|
out.set(dim, if (s1.get(dim).getFactorInt() > s2.get(dim).getFactorInt()) s2.get(dim) else s1.get(dim));