Пример #1
0
        public void LookAt(Vec2D target)
        {
            float x = target.X - position.X;
            float y = target.Y - position.Y;

            Rotation = Convert.ToSingle(Math.Atan2(y, x) * 180 / Math.PI) + 90f;
        }
Пример #2
0
 public bool Equals(Vec2D p)
 {
     return((X == p.X) && (Y == p.Y));
 }