Atan2(y,x) will return a float between -pi and pi. I want to calculate the distance between two angles, but the non-continuity is throwing me off.
See this for better understanding.
I want to be able to calculate the distance between Angle 1 and Angle 2.
The whole point of this is to be able to create a cone from the center to a specified angle. Essentially I will be evaluating:
if(DistanceFromAngle1 < pi/4 [45°])
{
Angle2 is part of cone
}
If by distance you mean the straight line joining the two interception points, you can calculate the distance by doing this:
SQRT = square root
ABS = Absolute value
If the distance is the angle, you calculate it by doing (pseudo-code)