help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions] Reference for unit 'math' (#rtl)

sincos

Return sine and cosine of argument

Declaration

Source position: math.pp line 261

procedure sincos(

  theta: float;

  out sinus: float;

  out cosinus: float

);

Description

Sincos calculates the sine and cosine of the angle theta, and returns the result in sinus and cosinus.

On Intel hardware, This calculation will be faster than making 2 calls to calculate the sine and cosine separately.

Errors

None.

See also

arcsin

  

Return inverse sine

arccos

  

Return inverse cosine

Example

Program Example41;

{ Program to demonstrate the sincos function. }

Uses math;

Procedure dosincos(Angle : Float);

Var
  Sine,Cosine : Float;

begin
  sincos(angle,sine,cosine);
  Write('Angle : ',Angle:8:6);
  Write(' Sine :',sine:8:6);
  Write(' Cosine :',cosine:8:6);
end;

begin
  dosincos(pi);
  dosincos(pi/2);
  dosincos(pi/3);
  dosincos(pi/4);
  dosincos(pi/6);
end.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505