diff --git a/src/lib.rs b/src/lib.rs index b8f0cb60..a71a9819 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -426,9 +426,10 @@ pub trait Conversion { type T: ConversionFactor; /// Coefficient portion of [conversion factor](https://jcgm.bipm.org/vim/en/1.24.html) for - /// converting the given unit to the base unit for the quantity: `(value * coefficient()) + - /// constant()`. Implementation should return the multiplicative identity (`Self::T::one()`) if - /// no coefficient exists. + /// converting the given unit. To convert to the base unit for the quantity use `(value + + /// constant()) * coefficient()`. To convert from the base unit, `(value / coefficient()) - + /// constant()` is used. Implementation should return the multiplicative identity + /// (`Self::T::one()`) if no coefficient exists. #[must_use = "method returns a new number and does not mutate the original value"] #[inline(always)] fn coefficient() -> Self::T { @@ -436,10 +437,11 @@ pub trait Conversion { } /// Constant portion of [conversion factor](https://jcgm.bipm.org/vim/en/1.24.html) for - /// converting the given unit to the base unit for the quantity: `(value * coefficient()) + - /// constant()`. Implementation should return the additive identity (`Self::T::zero()`) if no - /// constant exists. See [ConstantOp](enum.ConstantOp.html) documentation for details about - /// parameter use to ensure the method optimizes correctly. + /// converting the given unit. To convert to the base unit for the quantity use `(value + + /// constant()) * coefficient()`. To convert from the base unit, `(value / coefficient()) - + /// constant()` is used. Implementation should return the additive identity (`Self::T::zero()`) + /// if no constant exists. See [ConstantOp](enum.ConstantOp.html) documentation for details + /// about parameter use to ensure the method optimizes correctly. #[must_use = "method returns a new number and does not mutate the original value"] #[inline(always)] #[allow(unused_variables)]