/// <summary> /// Converts the value to one with an equivilant unit /// </summary> /// <param name="unit">The new value's units</param> /// <returns>The corisponding IValue object</returns> public IValue As(IGeneralUnit unit) { return(new Value(GetMagnitude() / UnitsMethods.GetUnitConversion(Unit, unit), unit)); }
/// <summary> /// Converts the value to one with an equivilant unit /// </summary> /// <param name="unit">The new value's units</param> /// <returns>The corisponding IValue object</returns> public IValue As(Units unit) { IGeneralUnit newUnit = new Unit(unit); return(new Value(GetMagnitude() / UnitsMethods.GetUnitConversion(Unit, newUnit), newUnit)); }