Esempio n. 1
0
        public double Distance(Position target)
        {
            var x = this.X - target.X;
            var y = this.Y - target.Y;

            return Math.Sqrt((x * x) + (y * y));
        }
Esempio n. 2
0
 public double Angle(Position target)
 {
     return Math.Atan2(target.Y - this.Y, target.X - this.X) * 180 / Math.PI;
 }