コード例 #1
0
        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);
        }
コード例 #2
0
 /// <inheritdoc cref="AreaMomentOfInertia.FromCentimetersToTheFourth(double)"/>
 public static AreaMomentOfInertia CentimetersToTheFourth(this decimal value) => AreaMomentOfInertia.FromCentimetersToTheFourth(Convert.ToDouble(value));
コード例 #3
0
 /// <inheritdoc cref="AreaMomentOfInertia.FromCentimetersToTheFourth(double?)"/>
 public static AreaMomentOfInertia?CentimetersToTheFourth(this decimal?value) => AreaMomentOfInertia.FromCentimetersToTheFourth(value == null ? (double?)null : Convert.ToDouble(value.Value));
コード例 #4
0
 /// <inheritdoc cref="AreaMomentOfInertia.FromCentimetersToTheFourth(double?)"/>
 public static AreaMomentOfInertia?CentimetersToTheFourth(this float?value) => AreaMomentOfInertia.FromCentimetersToTheFourth(value);
コード例 #5
0
 /// <inheritdoc cref="AreaMomentOfInertia.FromCentimetersToTheFourth(double)"/>
 public static AreaMomentOfInertia CentimetersToTheFourth(this double value) => AreaMomentOfInertia.FromCentimetersToTheFourth(value);
 public void NumberToCentimetersToTheFourthTest() =>
 Assert.Equal(AreaMomentOfInertia.FromCentimetersToTheFourth(2), 2.CentimetersToTheFourth());
コード例 #7
0
 public static AreaMomentOfInertia?CentimetersToTheFourth <T>(this T?value) where T : struct => AreaMomentOfInertia.FromCentimetersToTheFourth(value == null ? (double?)null : Convert.ToDouble(value.Value));
コード例 #8
0
 public static AreaMomentOfInertia CentimetersToTheFourth <T>(this T value) =>
 AreaMomentOfInertia.FromCentimetersToTheFourth(Convert.ToDecimal(value));