Пример #1
0
 /*
  * Convert into the unit passed.
  * Units are defined in in this class an are intended to be passed in by the caller to this "to" method
  */
 public double to(PublicUnits.Unit unit)
 {
     return(CUSTOM_LENGTH.To(unit.VAL));
 }
Пример #2
0
 /*
  * Constructor which also is needed to set the "from" value and unit
  */
 public PublicUnits(PublicUnits.Unit unit, double input)
 {
     CUSTOM_LENGTH.From(unit.VAL, input);
 }