ESBArcSin Function
Given a Value returns the Angle whose Sine it is, in Radians.

Unit
QESBPCSMath

Declaration
Function ESBArcSin(const X: Extended): Extended;

Description
Return Values are between -Pi/2 and Pi/2.

Parameters
Float to process.

Category
Arithmetic Routines for Floats

Implementation

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;


HTML generated by Time2HELP
http://www.time2help.com