| ESBArcSin Function |
Unit
QESBPCSMath
Declaration
Function ESBArcSin(const X: Extended): Extended;
Description
Return Values are between -Pi/2 and Pi/2.
| Parameters |
| X | Float to process. |
Category
Arithmetic Routines for FloatsImplementation
function ESBArcSin (const X: Extended): Extended;
var
Y: Extended;
begin
if abs (X) > 1 then
raise EMathError.Create (rsValueLEOne);
if X = 0 then
Result := 0
else
begin
Y := Sqrt (1 - Sqr (X));
if FloatIsZero (Y) then
begin
if X > 0 then
Result := PiOn2
else
Result := -PiOn2
end
else
Result := ESBArcTan (Y, X)
end;
End; |
|
|