function ArcTan2(Y: TMtxVec; X: TMtxVec): TMtxVec;
Inverse tangens of Y/X.
Result: stored in self (calling object), returns self for chaining
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 Matrix.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 Matrix.Complex properties do not match.
The result will fall in the range from -PI to PI radians.
Note
Matrix.ArcTan is calculated as ArcTan2(1, X).
Indexed: function ArcTan2(Y: TMtxVec; X: TMtxVec; YIndex: Integer; XIndex: Integer; Index: Integer; Len: Integer): TMtxVec;
Calculate the inverse tangens of Y/X by using Y elements [YIndex]..[YIndex+Len-1], X elements [XIndex]..[XIndex+Len-1] and store the results in calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Y | TMtxVec | source TVec or TMtx |
| 2 | X | TMtxVec | source TVec or TMtx |
| 3 | YIndex | Integer | Y start index |
| 4 | XIndex | Integer | X start index |
| 5 | Index | Integer | start index |
| 6 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
An exception is raised if array borders are overrun.