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;
CUDA function C/C++#include <cudaVFmath.h>
int cudaVF_atan2( fVector d_Z, fVector d_X, fVector d_Y, ui size );
int cudaVFx_atan2( fVector d_Z, fVector d_X, fVector d_Y, ui size, float A, float B, float C );
int cusdVFx_atan2( fVector d_Z, fVector d_X, fVector d_Y, ui size, float *d_A, float *d_B, float *d_C );
int VFcu_atan2( fVector h_Z, fVector h_X, fVector h_Y, ui size );
int VFxcu_atan2( fVector h_Z, fVector h_X, fVector h_Y, ui size, float A, float B, float C );
CUDA function Pascal/Delphiuses VFmath;
function cudaVF_atan2( d_Z, d_X, d_Y:fVector; size:UIntSize ): IntBool;
function cudaVFx_atan2( d_Z, d_X, d_Y:fVector; size:UIntSize; A, B, C:Single ): IntBool;
function cusdVFx_atan2( d_Z, d_X, d_Y:fVector; size:UIntSize; d_A, d_B, d_C:PSingle ): IntBool;
function VFcu_atan2( h_Z, h_X, h_Y:fVector; size:UIntSize ): IntBool;
function VFxcu_atan2( h_Z, h_X, h_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