Ejemplo n.º 1
0
 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.");
     }
 }
Ejemplo n.º 2
0
 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.");
     }
 }