Difference between revisions of "ESM Math Library"

Jump to navigation Jump to search
24 bytes removed ,  11:44, 12 May 2006
imported>JustTim
imported>Galsiah
Line 307: Line 307:
set f.cos to (1 - (f.t2*(0.4967 - (0.03705*f.t2))))
set f.cos to (1 - (f.t2*(0.4967 - (0.03705*f.t2))))
set f.cos to (f.cos*f.n)
set f.cos to (f.cos*f.n)
if (f.cos == 0)
    set f.cos to 0.00001 ;avoid divide by zero, and maintain tan = sin/cos
endif


set f.fout to f.sin
set f.fout to f.sin
set f.fout2 to f.cos
set f.fout2 to f.cos
;NB division is safe, since the above cos approximation cannot return 0.
set f.fout3 to f.sin/f.cos ;tan</pre>
set f.fout3 to f.sin/f.cos ;tan</pre>


Anonymous user

Navigation menu