Beispiel #1
0
 public static double ScalarProjection(this Vector of, Vector onto) => onto.Dot(of) / onto.Magnitude();
Beispiel #2
0
 public static double Angle(this Vector v1, Vector v2) => Acos(v1.Dot(v2) / (float)(v1.Magnitude() * v2.Magnitude()));
Beispiel #3
0
 public static Vector Unit(this Vector v) => v / (float)v.Magnitude();