// Ceiling, Floor? public static T DivRem <T>(T dividend, T divisor, out T remainder) { try { var dT = DynamicStaticTypeMembers.Create <T>(); return(dT.DivRem(dividend, divisor, out remainder)); } catch { var dT = DynamicStaticTypeMembers.Create(typeof(Math)); return(dT.DivRem(dividend, divisor, out remainder)); } }
public static T Abs <T>(T a) { // TODO: If T is unsigned, return a try { var dT = DynamicStaticTypeMembers.Create <T>(); return(dT.Abs(a)); } catch { dynamic da = a; return(Math.Abs(da)); } }