public Quantity Convert(Unit u) { var a = Unit.ToBase(amount); a = u.FromBase(a); return(new Quantity(a, u)); }
private double ConvertTo(double d, Unit u) { if (ReferenceEquals(null, u)) { return(double.NaN); } if (!IsSameMeasure(u)) { return(double.NaN); } d = Unit.ToBase(d); return(u.FromBase(d)); }