round is not a unit-safe method since it depends on the underlying base unit in the current implementation. I don't think it should exist on quantities right now.
Doing this properly would require either generating methods of the form round_in_<unit>, or could be done cleaner using the proposal in #56 by adding a round_in method which takes a unit ZST as an argument:
let length = Meters(1.95);
let feet = length.round_in(Feet);
let inches = (length - Feet(feet)).round_in(Inches);
round
is not a unit-safe method since it depends on the underlying base unit in the current implementation. I don't think it should exist on quantities right now.Doing this properly would require either generating methods of the form
round_in_<unit>
, or could be done cleaner using the proposal in #56 by adding around_in
method which takes a unit ZST as an argument: