Esempio n. 1
0
 public object Cross(KalkVector x, KalkVector y)
 {
     if (x == null)
     {
         throw new ArgumentNullException(nameof(x));
     }
     if (y == null)
     {
         throw new ArgumentNullException(nameof(y));
     }
     if (x.Length != 3 || (x.ElementType != typeof(float) && x.ElementType != typeof(double)))
     {
         throw new ArgumentOutOfRangeException(nameof(x), "Expecting a float3 or double3 vector.");
     }
     if (y.Length != 3 || (y.ElementType != typeof(float) && y.ElementType != typeof(double)))
     {
         throw new ArgumentOutOfRangeException(nameof(y), "Expecting a float3 or double3 vector.");
     }
     return(KalkVector.Cross(x, y));
 }