Function const_units::si
source · pub const fn si(units: &str) -> SIExpand description
Parse a string as SI units. Panics if the string can’t be parsed.
// Nanogram per microsecond squared (prefixes end up cancelling out)
assert_eq!(si("ng us^-2"), kilogram.mul(second.powi(-2)))