Exemple #1
0
        public static MyVector2D Normalize(MyVector2D v)
        {
            double length = v.Magnitude();

            return(new MyVector2D(v.X / length, v.Y / length));
        }
Exemple #2
0
 public static double GetAngleBetweenTwoVectors(MyVector2D v1, MyVector2D v2)
 {
     return(Math.Acos(MyVector2D.ScalarProduct(v1, v2) / (v1.Magnitude() * v2.Magnitude())));
 }