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