Repository navigation
v0.20.0
This release resolves long-standing issue #3 to implement thermodynamic temperature conversions (e.g. Celsius to Fahrenheit). Support is also added for multiple quantities of the same dimension (e.g. thermodynamic temperature and temperature interval, ratio and angle).
The release also contains a number of internal changes including a reorganization of tests into multiple files and updated CI setup to provide faster builds and more feature test coverage.
Added
- #3 Implement thermodynamic temperature conversions (e.g. Celsius to Fahrenheit). Extend the
quantity!macro to accept a coefficient and optional constant factor in the$conversionparameter to support these conversions. - #14 Implement
FromStr. - #78 Add a
Kindassociated type toDimensions.The newKindassociated type, defaulting touom::Kind, allows for multiple quantities that have the same dimensions. Quantities of different kinds are not comparable. The marker traits implemented by a quantity'sKindcontrol which operations are automatically implemented. - #95
TemperatureIntervalquantity added. IncludesAdd,AddAssign,Sub, andSubAssignimplementations between thermodynamic temperature and temperature interval.
Changed
- [Breaking] Remove unused
_unit: Nparameters and require turbofish syntax forget,floor,ceil,round,trunc, andfractmethods ofQuantity. This is a breaking change and can easily be resolved. e.g.l.get(meter)becomesl.get::<meter>(). - #98, #100 Correct
uomfeature hygiene in macro generated code. Previously thesystem!macro generated code that included#[cfg(feature = "...")]attributes on code in the crate executing thesystem!macro. With this fix these attributes will be eagerly evaluated and only generate code when the appropriateuomfeature is enabled. - Spelling corrections for a number of documentation comments and unit abbreviations.