Beispiel #1
0
 public static double DistanceTo(ActorBase from, ActorBase to)
 {
     return(PointD.DistanceTo(from.Location, to.Location));
 }
Beispiel #2
0
 public static double AngleTo(ActorBase from, PointD to)
 {
     return(PointD.AngleTo(from.Location, to));
 }
Beispiel #3
0
        public static bool IsPointingAt(ActorBase fromObj, ActorBase atObj, double toleranceDegrees)
        {
            var deltaAngle = Math.Abs(DeltaAngle(fromObj, atObj));

            return(deltaAngle < toleranceDegrees || deltaAngle > (360 - toleranceDegrees));
        }
Beispiel #4
0
 public static double AngleTo(PointD from, ActorBase to)
 {
     return(PointD.AngleTo(from, to.Location));
 }