home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programming
/
powerprogramming1994.iso
/
progtool
/
surfmodl
/
surfm203.arc
/
SURFSRC.ARC
/
ARCCOS.INC
< prev
next >
Wrap
Text File
|
1987-12-21
|
290b
|
12 lines
function ARCCOS (X: real): real;
{ returns the arc-cosine of X in radians }
begin
{ Prevent errors on out-of-range }
if (X >= 1.0) then
Arccos := 0.0
else if (X <= -1.0) then
Arccos := 3.141592654
else
Arccos := -arctan(X / sqrt (-X * X + 1)) + 1.5708;
end;