static Quaternion() { if (typeof(T) == typeof(float)) { math = new MathFloat() as Math <T>; } else if (typeof(T) == typeof(double)) { math = new MathDouble() as Math <T>; } if (math == null) { throw new InvalidOperationException("Type " + typeof(T) + " is not supported by Quaternion."); } }
static Transform() { if (typeof(T) == typeof(float)) { math = new MathFloat() as Math <T>; } if (typeof(T) == typeof(double)) { math = new MathDouble() as Math <T>; } if (math == null) { throw new InvalidOperationException("Type " + typeof(T) + " is not supported by Transform."); } }