예제 #1
0
 public double GetValue(Unit unit)
 {
     ConfirmUnitMatch(Unit, unit);
     return(unit.FromSI(Unit.ToSI(Number)));
 }
예제 #2
0
 public void SetUnit(Unit unit)
 {
     ConfirmUnitMatch(Unit, unit);
     Unit = unit.Clone();
 }
예제 #3
0
 public void SetValue(double value, Unit unit)
 {
     Unit     = unit.Clone();
     _siValue = Unit.ToSI(value);
 }
예제 #4
0
 public UnitNumber(double value, Unit unit)
 {
     SetValue(value, unit);
 }