Angle()
Appearance
Accepts Y and X components and returns their directional angle in degrees. The function calculates atan2(y, x), converts the result from radians to degrees, and normalizes it to the range of 0 through less than 360.
float y = 1.0;
float x = 1.0;
float result = angle(y, x);
// result = 45.0The resulting directions are:
0degrees - Positive X.90degrees - Positive Y.180degrees - Negative X.270degrees - Negative Y.
When used with screen coordinates, where positive Y points downward, the resulting angle increases clockwise.