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.FromFeetToTheFourth(double)"/> public static AreaMomentOfInertia FeetToTheFourth(this decimal value) => AreaMomentOfInertia.FromFeetToTheFourth(Convert.ToDouble(value));
/// <inheritdoc cref="AreaMomentOfInertia.FromFeetToTheFourth(double?)"/> public static AreaMomentOfInertia?FeetToTheFourth(this decimal?value) => AreaMomentOfInertia.FromFeetToTheFourth(value == null ? (double?)null : Convert.ToDouble(value.Value));
/// <inheritdoc cref="AreaMomentOfInertia.FromFeetToTheFourth(double?)"/> public static AreaMomentOfInertia?FeetToTheFourth(this float?value) => AreaMomentOfInertia.FromFeetToTheFourth(value);
/// <inheritdoc cref="AreaMomentOfInertia.FromFeetToTheFourth(double)"/> public static AreaMomentOfInertia FeetToTheFourth(this double value) => AreaMomentOfInertia.FromFeetToTheFourth(value);
public void NumberToFeetToTheFourthTest() => Assert.Equal(AreaMomentOfInertia.FromFeetToTheFourth(2), 2.FeetToTheFourth());
public static AreaMomentOfInertia?FeetToTheFourth <T>(this T?value) where T : struct => AreaMomentOfInertia.FromFeetToTheFourth(value == null ? (double?)null : Convert.ToDouble(value.Value));
public static AreaMomentOfInertia FeetToTheFourth <T>(this T value) => AreaMomentOfInertia.FromFeetToTheFourth(Convert.ToDecimal(value));