mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-12 09:29:07 +02:00
+ cot, sec, csc, secant, cosecant (mantis #8142)
git-svn-id: trunk@6170 -
This commit is contained in:
parent
c1b1be9a67
commit
0e1c9c901d
@ -262,8 +262,14 @@ function radtocycle(rad : float) : float;
|
|||||||
|
|
||||||
function tan(x : float) : float;
|
function tan(x : float) : float;
|
||||||
function cotan(x : float) : float;
|
function cotan(x : float) : float;
|
||||||
|
function cot(x : float) : float; inline;
|
||||||
procedure sincos(theta : float;out sinus,cosinus : float);
|
procedure sincos(theta : float;out sinus,cosinus : float);
|
||||||
|
|
||||||
|
function secant(x : float) : float; inline;
|
||||||
|
function cosecant(x : float) : float; inline;
|
||||||
|
function sec(x : float) : float; inline;
|
||||||
|
function csc(x : float) : float; inline;
|
||||||
|
|
||||||
{ inverse functions }
|
{ inverse functions }
|
||||||
|
|
||||||
function arccos(x : float) : float;
|
function arccos(x : float) : float;
|
||||||
@ -677,6 +683,11 @@ function cotan(x : float) : float;
|
|||||||
end;
|
end;
|
||||||
{$endif FPC_MATH_HAS_COTAN}
|
{$endif FPC_MATH_HAS_COTAN}
|
||||||
|
|
||||||
|
function cot(x : float) : float; inline;
|
||||||
|
begin
|
||||||
|
cot := cotan(x);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$ifndef FPC_MATH_HAS_SINCOS}
|
{$ifndef FPC_MATH_HAS_SINCOS}
|
||||||
procedure sincos(theta : float;out sinus,cosinus : float);
|
procedure sincos(theta : float;out sinus,cosinus : float);
|
||||||
@ -687,6 +698,30 @@ procedure sincos(theta : float;out sinus,cosinus : float);
|
|||||||
{$endif FPC_MATH_HAS_SINCOS}
|
{$endif FPC_MATH_HAS_SINCOS}
|
||||||
|
|
||||||
|
|
||||||
|
function secant(x : float) : float; inline;
|
||||||
|
begin
|
||||||
|
secant := 1 / cos(x);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function cosecant(x : float) : float; inline;
|
||||||
|
begin
|
||||||
|
cosecant := 1 / sin(x);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function sec(x : float) : float; inline;
|
||||||
|
begin
|
||||||
|
sec := secant(x);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function csc(x : float) : float; inline;
|
||||||
|
begin
|
||||||
|
csc := cosecant(x);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ ArcSin and ArcCos from Arjan van Dijk (arjan.vanDijk@User.METAIR.WAU.NL) }
|
{ ArcSin and ArcCos from Arjan van Dijk (arjan.vanDijk@User.METAIR.WAU.NL) }
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user