Esempio n. 1
0
        public int GetDistanceSquared(LogicVector2 vector2)
        {
            int x        = this.m_x - vector2.m_x;
            int distance = 0x7FFFFFFF;

            if ((uint)(x + 46340) <= 92680)
            {
                int y = this.m_y - vector2.m_y;

                if ((uint)(y + 46340) <= 92680)
                {
                    int distanceX = x * x;
                    int distanceY = y * y;

                    if ((uint)distanceY < (distanceX ^ 0x7FFFFFFFu))
                    {
                        distance = distanceX + distanceY;
                    }
                }
            }

            return(distance);
        }
Esempio n. 2
0
 public int Dot(LogicVector2 vector2)
 {
     return(this.m_x * vector2.m_x + this.m_y * vector2.m_y);
 }
Esempio n. 3
0
 public void Add(LogicVector2 vector2)
 {
     this.m_x += vector2.m_x;
     this.m_y += vector2.m_y;
 }
Esempio n. 4
0
 public void Substract(LogicVector2 vector2)
 {
     this.m_x -= vector2.m_x;
     this.m_y -= vector2.m_y;
 }
Esempio n. 5
0
 public void Multiply(LogicVector2 vector2)
 {
     this.m_x *= vector2.m_x;
     this.m_y *= vector2.m_y;
 }
Esempio n. 6
0
 public bool IsEqual(LogicVector2 vector2)
 {
     return(this.m_x == vector2.m_x && this.m_y == vector2.m_y);
 }