Beispiel #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.Units unit)
 {
     return(CUSTOM_LENGTH.To(unit.ToString()));
 }
Beispiel #2
0
 /*
  * Constructor which also is needed to set the "from" value and unit
  */
 public PublicUnits(PublicUnits.Units unit, double input)
 {
     CUSTOM_LENGTH.From(unit.ToString(), input);
 }