Exemple #1
0
        public static string Abbreviation(this MomentEnum unitEnum)
        {
            switch (unitEnum)
            {
            case MomentEnum.PoundInches: return("lb-in.");

            case MomentEnum.FootPounds: return("lb-ft");

            case MomentEnum.NewtonMeters: return("N-m");

            default: throw new ArgumentOutOfRangeException(nameof(unitEnum), unitEnum, null);
            }
        }
Exemple #2
0
        public static double ConversionFactor(this MomentEnum unitEnum)
        {
            switch (unitEnum)
            {
            case MomentEnum.PoundInches: return(1);

            case MomentEnum.FootPounds: return(12);

            case MomentEnum.NewtonMeters: return(8.850745791327);

            default: throw new ArgumentOutOfRangeException(nameof(unitEnum), unitEnum, null);
            }
        }
Exemple #3
0
 MomentType(MomentEnum unitEnum)
 {
     UnitEnum = unitEnum;
 }