Computes the arctangent angle in the Euclidean plane, given in radians. atan2 is far more superior because atan can only return an angle of -90 to +90 degrees or -pi/2 to pi/2. atan2 is mostly used on "Aimbots". I always use atan2 beside of atan when I am dealing with geometric computaions.
Method 1 SCM-Function:
{
computes atan2(y,x) where y = 0@ , x = 1@
Usage:
0AB1: @atan2 2 _floatY 23@ _floatX 5@ _floatresult 14@ // 14@ = atan2(23@,5@) where 14@ is in radians format
14@ *= 57.295779817106167876798171061675 // 14@ in degrees format(optional)
}
:atan2
if 1@ <> 0
then
0087: 30@ = 0@ // (float)
0073: 30@ /= 1@ // (float)
0C08: math 31@ = arctangent 30@ // (float)
if 1@ < 0 // a -x value
then
if 0@ < 0...