예제 #1
0
        public float AngleBetween(Vector2 other)
        {
            Vector2 a = GetNormalized();
            Vector2 b = other.GetNormalized();

            float d = a.Dot(b);

            return((float)Math.Acos(d));
        }
예제 #2
0
        float AngleBetween(Vector2 other)
        {
            Vector2 a = GetNormalized();
            Vector2 b = other.GetNormalized();

            float d = a.x * b.x + a.y * b.y;

            return((float)Math.Acos(d));
        }