You are here: Symbol Reference > AbstractMtxVec Namespace > Classes > TMtxVec Class > public > SinCos Method > TMtxVec.SinCos Method (TMtxVec, TMtxVec)
MtxVec VCL
ContentsIndex
PreviousUpNext
TMtxVec.SinCos Method (TMtxVec, TMtxVec)

Sine and cosine.

Pascal
procedure SinCos(const SinX: TMtxVec; const CosX: TMtxVec); overload;

Calculates the sine and cosine for all calling object elements and stores the sines to SinX and cosines to CosX. Size and Complex property of SinX and CosX are adjusted automatically.

Use this method if you require both sine and cosine.

var a: TVec; s,c: TVec; begin CreateIt(a,s,c); try a.SetIt(false[0,PIDIV2,PI]); a.SinCos(s,c); // s=[0,1,0], c =[1,0,-1] finally FreeIt(a,s,c); end; end;
Examples on GitHub
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!