public void MoveInDirectionOf(PointD location, double?speed = null) { this.Velocity.Angle.Degrees = PointD.AngleTo(this.Location, location); if (speed != null) { this.Velocity.MaxSpeed = (double)speed; } }
public static double AngleTo(ActorBase from, PointD to) { return(PointD.AngleTo(from.Location, to)); }
public static double AngleTo(PointD from, ActorBase to) { return(PointD.AngleTo(from, to.Location)); }