Wiki > TV3D65 Index > TVMathLibrary
ATan2
DESCRIPTION
Calculates the ATan2 of a two arguments x,y. The ATan2 function is Arc Tangent or the Inverse Tangent that distinguishes between opposite directions.
DECLARATION
| VB.NET | ATan2(fY As Single , fX As Single) As Single |
| C++ | float ATan2(float fY , float fX ) |
PARAMETERS
| NAME | OPTIONAL | DESCRIPTION |
| fY | No | fY parameter (or Y coordinate) |
| fX | No | fX parameter (or X coordinate) |
RETURN VALUE
| Single | ATan2 value (in radians or degrees) of fX, fY. Value is in interval (-pi;pi> or (-180;180> |
EXAMPLES
TIPS
- Notice reverse order of arguments fY, fX.
- This function can be used to obtain angle from direction vector.
- To change return format between degrees and radians use SetAngleSystem of TVEngine.