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); } }
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); } }
MomentType(MomentEnum unitEnum) { UnitEnum = unitEnum; }