Ver código fonte

Canonicalize the base representation

David Peter 2 anos atrás
pai
commit
de50beacb9
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      numbat/src/unit.rs

+ 2 - 1
numbat/src/unit.rs

@@ -167,7 +167,8 @@ impl Unit {
                      exponent,
                  }| { base_unit.corresponding_base_unit().power(*exponent) },
             )
-            .product();
+            .product::<Self>()
+            .canonicalized();
 
         let factor = self
             .iter()