Skip to main content

ensure_unit

Function ensure_unit 

Source
fn ensure_unit(value: &RValue, default_units: &str) -> RValue
Expand description

Wrap a unit value: if x is already a unit object, return it; otherwise create unit(x, default_units).