public void ConversionRoundTrip() { AreaMomentOfInertia metertothefourth = AreaMomentOfInertia.FromMetersToTheFourth(1); AssertEx.EqualTolerance(1, AreaMomentOfInertia.FromCentimetersToTheFourth(metertothefourth.CentimetersToTheFourth).MetersToTheFourth, CentimetersToTheFourthTolerance); AssertEx.EqualTolerance(1, AreaMomentOfInertia.FromDecimetersToTheFourth(metertothefourth.DecimetersToTheFourth).MetersToTheFourth, DecimetersToTheFourthTolerance); AssertEx.EqualTolerance(1, AreaMomentOfInertia.FromFeetToTheFourth(metertothefourth.FeetToTheFourth).MetersToTheFourth, FeetToTheFourthTolerance); AssertEx.EqualTolerance(1, AreaMomentOfInertia.FromInchesToTheFourth(metertothefourth.InchesToTheFourth).MetersToTheFourth, InchesToTheFourthTolerance); AssertEx.EqualTolerance(1, AreaMomentOfInertia.FromMetersToTheFourth(metertothefourth.MetersToTheFourth).MetersToTheFourth, MetersToTheFourthTolerance); AssertEx.EqualTolerance(1, AreaMomentOfInertia.FromMillimetersToTheFourth(metertothefourth.MillimetersToTheFourth).MetersToTheFourth, MillimetersToTheFourthTolerance); }
/// <inheritdoc cref="AreaMomentOfInertia.FromDecimetersToTheFourth(double?)"/> public static AreaMomentOfInertia?DecimetersToTheFourth(this double?value) => AreaMomentOfInertia.FromDecimetersToTheFourth(value);
/// <inheritdoc cref="AreaMomentOfInertia.FromDecimetersToTheFourth(double)"/> public static AreaMomentOfInertia DecimetersToTheFourth(this long value) => AreaMomentOfInertia.FromDecimetersToTheFourth(value);
/// <inheritdoc cref="AreaMomentOfInertia.FromDecimetersToTheFourth(double?)"/> public static AreaMomentOfInertia?DecimetersToTheFourth(this decimal?value) => AreaMomentOfInertia.FromDecimetersToTheFourth(value == null ? (double?)null : Convert.ToDouble(value.Value));
/// <inheritdoc cref="AreaMomentOfInertia.FromDecimetersToTheFourth(double)"/> public static AreaMomentOfInertia DecimetersToTheFourth(this decimal value) => AreaMomentOfInertia.FromDecimetersToTheFourth(Convert.ToDouble(value));
public void NumberToDecimetersToTheFourthTest() => Assert.Equal(AreaMomentOfInertia.FromDecimetersToTheFourth(2), 2.DecimetersToTheFourth());
public static AreaMomentOfInertia?DecimetersToTheFourth <T>(this T?value) where T : struct => AreaMomentOfInertia.FromDecimetersToTheFourth(value == null ? (double?)null : Convert.ToDouble(value.Value));
public static AreaMomentOfInertia DecimetersToTheFourth <T>(this T value) => AreaMomentOfInertia.FromDecimetersToTheFourth(Convert.ToDecimal(value));