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

Sine and cosine.

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

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

Use this method if you require both sine and cosine.

var a: TOpenCLVector; s,c: TOpenCLVector; begin CreateIt(a,s,c); try a.CopyFromArray(TSingleArray.Create(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!