Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SinCos function in Delphi 6 1

Status
Not open for further replies.

Stretchwickster

Programmer
Apr 30, 2001
1,746
GB
Hi,

I'm quite new to Delphi and I want to use the SinCos procedure to derive 2 values from the same angle instead of using the separate Sin and Cos functions. However, SinCos only seems to accept variables of "Extended" type whereas the Sin and Cos functions can accept "Doubles" as well as "Extended".

Is there any easy way to use "Doubles" with the SinCos procedure?

Your help would be much appreciated! :)
 
you have to use extended with SinCos but,
you can make smth like :

procedure MySinCos (theta : extended; Var Sin, Cos : Double);
var eSin,eCos : extended;
begin
SinCos(theta,eSin,eCos);
Sin := eSin;
Cos := eCos;
end;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top