예제 #1
0
        public static Polar2D MoveTowards(Polar2D current, Polar2D target, float angleMaxDelta, float distanceMaxDelta)
        {
            float angle    = Mathf.MoveTowardsAngle(current.Angle, target.Angle, angleMaxDelta);
            float distance = Mathf.MoveTowards(current.Distance, target.Distance, distanceMaxDelta);

            return(new Polar2D(angle, distance));
        }
예제 #2
0
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }
            Polar2D polar2D = (Polar2D)obj;

            return(Angle == polar2D.Angle && Distance == polar2D.Distance);
        }