Exemple #1
0
 public static double CrossMagnitudeSquared(this IVector a, IVector b)
 {
     if (a.Count != b.Count) throw new ArgumentException();
     return a.LengthSquared() * b.LengthSquared() - Dot(a, b) * Dot(a, b);
 }
Exemple #2
0
 public static IVector ProjectionOnto(this IVector a, IVector b)
 {
     return b.Multiply(a.Dot(b) / b.LengthSquared());
 }