/// <summary> /// Divides <paramref name="left"/> by <paramref name="right"/> /// </summary> /// <param name="left">The left value</param> /// <param name="right">The right value</param> /// <returns>The <see cref="Mass"/> that is the result from the division.</returns> public static Mass operator /(Volume left, SpecificVolume right) { return(Mass.FromKilograms(left.cubicMetres / right.cubicMetresPerKilogram)); }
/// <summary> /// Divides <paramref name="left"/> by <paramref name="right"/> /// </summary> /// <param name="left">The left value</param> /// <param name="right">The right value</param> /// <returns>The <see cref="Mass"/> that is the result from the division.</returns> public static Mass operator /(Force left, Acceleration right) { return(Mass.FromKilograms(left.newtons / right.metresPerSecondSquared)); }
public bool Equals(Mass other, Mass tolerance) { Ensure.GreaterThan(tolerance.kilograms, 0, nameof(tolerance)); return(Math.Abs(this.kilograms - other.kilograms) < tolerance.kilograms); }
/// <summary> /// Multiplies <paramref name="left"/> with <paramref name="right"/> /// </summary> /// <param name="left">The left value</param> /// <param name="right">The right value</param> /// <returns>The <see cref="Mass"/> that is the result from the multiplication.</returns> public static Mass operator *(Volume left, Density right) { return(Mass.FromKilograms(left.cubicMetres * right.kilogramsPerCubicMetre)); }
public int CompareTo(Mass quantity) { return(this.kilograms.CompareTo(quantity.kilograms)); }
public bool Equals(Mass other) { return(this.kilograms.Equals(other.kilograms)); }
public static bool TryParse(string text, NumberStyles styles, IFormatProvider provider, out Mass result) { return(QuantityParser.TryParse <MassUnit, Mass>(text, From, styles, provider, out result)); }
public static bool TryParse(string text, NumberStyles styles, out Mass result) { return(QuantityParser.TryParse <MassUnit, Mass>(text, From, styles, CultureInfo.CurrentCulture, out result)); }
public static Mass operator *(Time left, MassFlow right) { return(Mass.FromKilograms(left.seconds * right.kilogramsPerSecond)); }
public static Mass operator *(MolarMass left, AmountOfSubstance right) { return(Mass.FromKilograms(left.kilogramsPerMole * right.moles)); }
/// <summary> /// Divides <paramref name="left"/> by <paramref name="right"/> /// </summary> /// <param name="left">The left value</param> /// <param name="right">The right value</param> /// <returns>The <see cref="Mass"/> that is the result from the division.</returns> public static Mass operator /(Energy left, SpecificEnergy right) { return(Mass.FromKilograms(left.joules / right.joulesPerKilogram)); }