clVector.ArcTan2 Method

function ArcTan2(Y: TOpenCLMtxVec; X: TOpenCLMtxVec): TOpenCLMtxVec;

Inverse tangens of Y/X.

#NameTypeDescription
1YTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2XTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix

Result: stored in self (calling object), returns self for chaining

Remarks:

Calculates the inverse tangens of Y/X, and returns an angle in the correct quadrant. The results are stored in calling object elements. Size and clVector.Complex properties of calling object are adjusted automatically to match those of X and Y objects. An exception is raised if X and Y size and clVector.Complex properties do not match.

Note that clVector.ArcTan is calculated as ArcTan2(1, X).

See Also: clVector.ArcTan

Indexed: function ArcTan2(Y: TOpenCLMtxVec; X: TOpenCLMtxVec; YIndex: Integer; XIndex: Integer; Index: Integer; Len: Integer): TOpenCLMtxVec;

Calculate the inverse tangens of Y/X.

#NameTypeDescription
1YTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2XTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
3YIndexIntegerY start index
4XIndexIntegerX start index
5IndexIntegerstart index
6LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Remarks:

Calculation uses Y elements [YIndex]..[YIndex+Len-1], X elements [XIndex]..[XIndex+Len-1] and stores the results in calling object elements [Index]..[Index+Len-1]. An exception is raised if array borders are overrun.