Skip to content

v0.20.0

Choose a tag to compare

@iliekturtles iliekturtles released this 07 Sep 21:16
· 452 commits to master since this release

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 $conversion parameter to support these conversions.
  • #14 Implement FromStr.
  • #78 Add a Kind associated type to Dimensions.The new Kind associated type, defaulting to uom::Kind, allows for multiple quantities that have the same dimensions. Quantities of different kinds are not comparable. The marker traits implemented by a quantity's Kind control which operations are automatically implemented.
  • #95 TemperatureInterval quantity added. Includes Add, AddAssign, Sub, and SubAssign implementations between thermodynamic temperature and temperature interval.

Changed

  • [Breaking] Remove unused _unit: N parameters and require turbofish syntax for get, floor, ceil, round, trunc, and fract methods of Quantity. This is a breaking change and can easily be resolved. e.g. l.get(meter) becomes l.get::<meter>().
  • #98, #100 Correct uom feature hygiene in macro generated code. Previously the system! macro generated code that included #[cfg(feature = "...")] attributes on code in the crate executing the system! macro. With this fix these attributes will be eagerly evaluated and only generate code when the appropriate uom feature is enabled.
  • Spelling corrections for a number of documentation comments and unit abbreviations.