Beispiel #1
0
 public static void CheckUnit(this Arrow arrow)
 {
     if (arrow.Magnitude() != 1)
     {
         throw new ArgumentException("Arrow must be a unit vector.");
     }
 }
Beispiel #2
0
 public static void CheckNonZero(this Arrow arrow)
 {
     if (arrow.Magnitude() == 0)
     {
         throw new ArgumentException("Arrow must be non-zero.");
     }
 }