VF_atan2VD_atan2VE_atan2
VFx_atan2VDx_atan2VEx_atan2
Functionarcus tangens function of quotients
Syntax C/C++#include <VFmath.h>
int VF_atan2( fVector Z, fVector X, fVector Y, ui size );
int VFx_atan2( fVector Z, fVector X, fVector Y, ui size, float A, float B, float C );
C++ VecObj#include <OptiVec.h>
int vector<T>::atan2( const vector<T>& X, const vector<T>& Y );
int vector<T>::x_atan2( const vector<T>& X, const vector<T>& Y, const T& A, const T& B, const T& C );
Pascal/Delphiuses VFmath;
function VF_atan2( Z, X, Y:fVector; size:UIntSize ): IntBool;
function VFx_atan2( Z, X, Y:fVector; size:UIntSize; A, B, C:Single ): IntBool;
Descriptionnormal versions: Zi = arctan( Yi / Xi )
expanded versions: Zi = C * arctan( Yi / (A*Xi+B) )
From Cartesian X -Y-coordinates, the angle of the corresponding polar coordinates is calculated.
Note: in comparison to the ANSI C function atan2, the ordering of the parameters X and Y is reversed.
Error handlingIf Xi and Yi are both zero, a DOMAIN error results with the default result NAN ("not-a-number").
In C/C++, this error is handled by _matherr and _matherrl with Xi and Yi as e->x and e->y.
Return valueFALSE (0), if no error occurred, otherwise TRUE (non-zero).
See alsoVF_tan,   VF_asin,   VF_acos,   VF_atan,  atan,  atan2

VectorLib Table of Contents  OptiVec home