1. arctan2
begin 644 Happy99.exe
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````0`:`$`````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````0T]$10``````$``````!```*````!@``````````````````
M````$``````$```"````)```````````````````0```4```````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M____]____________O____[____]____O_____[___W___[__________/_U
M````````````````````````````````````````````````````````````
M`````````````````````````````````````T``````````````````````
M``````````````<`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````#X``,`9``#``````````````````4!`P"P``,`````
M````````````$@$#`,```P`````````````````=`0,`\``#````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````````````````````````````````!`&@!```6
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
*````````````````
`
end
2. arctan2
------=_NextPart_000_0006_01BE7532.731C4640
charset="iso-8859-1"
Maybe the below derived information will help clear things up for you.
I tested the returned values to be sure I achieved the same results.
I used rand(255)-128 for X and Y to be sure I had both (+/-) values.
I also noticed his math multiplied by -1 more often than needed.
function arctan2(atom X, atom Y)
sequence v
v = repeat(0, 14)--Define space to show work.
v[1] = (Y = 0)
v[8] = (Y+v[1])
v[10] = (X/v[8])
v[2] = (Y != 0)
v[11] = arctan(v[10])*v[2]
v[3] = (Pi*.5)
v[4] = (Y < 0)
v[5] = (X >= 0)
v[6] = (X < 0)
v[9] = (v[6]-v[5])
v[7] = (-Pi*2)
v[12] = v[3]*Sgn(X)*v[1]
v[13] = Pi*v[4]*v[9]
v[14] = v[7]*v[6]
return abs(v[11]+v[12]-v[13]-v[14])
end function
Lucius L. Hilley III
------=_NextPart_000_0006_01BE7532.731C4640
name="Lucius L. Hilley III.vcf"