Beispiel #1
0
        public double AngleToKick(SeenCoachObject other)
        {
            var angle = AngleTo(other);

            angle = angle - BodyAngle.Value;
            if (angle < -180)
            {
                angle = angle + 360;
            }
            else if (angle > 180)
            {
                angle = angle - 360;
            }
            return(angle);
        }
Beispiel #2
0
 public double DistanceTo(SeenCoachObject other)
 {
     return(Math.Sqrt(Math.Pow(Pos.Value.Y - other.Pos.Value.Y, 2) + Math.Pow(Pos.Value.X - other.Pos.Value.X, 2)));
 }
Beispiel #3
0
        public double AngleTo(SeenCoachObject other)
        {
            var angle = Math.Atan2(other.Pos.Value.Y - Pos.Value.Y, other.Pos.Value.X - Pos.Value.X) * 180 / Math.PI;

            return(angle);
        }