/* * 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())); }
/* * 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); }