public double GetConvertedValGravAcceleration(double value, string from, string to) { UnitsReflectionHelper <UnitGravAcceleration> helper = new UnitsReflectionHelper <UnitGravAcceleration>(); UnitGravAcceleration unitFrom = helper.GetUnit(from); UnitGravAcceleration unitTo = helper.GetUnit(to); return(new GravAcceleration(value, unitFrom).GetConvertedVal(unitTo)); }
public double GetConvertedValTime(double value, string from, string to) { UnitsReflectionHelper <UnitTime> helper = new UnitsReflectionHelper <UnitTime>(); UnitTime unitFrom = helper.GetUnit(from); UnitTime unitTo = helper.GetUnit(to); return(new Time(value, unitFrom).GetConvertedVal(unitTo)); }
public double GetConvertedValDensity(double value, string from, string to) { UnitsReflectionHelper <UnitDensity> helper = new UnitsReflectionHelper <UnitDensity>(); UnitDensity unitFrom = helper.GetUnit(from); UnitDensity unitTo = helper.GetUnit(to); return(new Density(value, unitFrom).GetConvertedVal(unitTo)); }