FunctionPythagoras "hypotenuse" function.
Syntax C/C++#include <VFmath.h>
int VF_hypotV( fVector Z, fVector X, fVector Y, ui size );
int VFx_hypotV( fVector Z, fVector X, fVector Y, ui size, float A, float B );
C++ VecObj#include <OptiVec.h>
int vector<T>::hypotV( const vector<T>& X, const vector<T>& Y );
int vector<T>::x_hypotV( const vector<T>& X, const vector<T>& Y, const T& A, const T& B );
Pascal/Delphiuses VFmath;
function VF_hypotV( Z, X, Y:fVector; size:UIntSize ): IntBool;
function VFx_hypotV( Z, X, Y:fVector; size:UIntSize; A, B:Single ): IntBool;
CUDA function C/C++#include <cudaVFmath.h>
#include <cudaVCFmath.h>
int cudaVF_hypotV( fVector d_Z, fVector d_X, fVector d_Y,ui size );
int cudaVFx_hypotV( fVector d_Z, fVector d_X, fVector d_Y, ui size, float A, float B );
int cusdVFx_hypotV( fVector d_Z, fVector d_X, fVector d_Y, ui size, float *d_A, float *d_B );
void VFcu_hypotV( fVector h_Z, fVector h_X, fVector h_Y,ui size );
void VFxcu_hypotV( fVector h_Z, fVector h_X, fVector h_Y, ui size, float A, float B );
CUDA function Pascal/Delphiuses VFmath, VCFmath;
function cudaVF_hypotV( d_Z, d_X, d_Y:fVector; size:UIntSize ): IntBool;
function cudaVFx_hypotV( d_Z, d_X, d_Y:fVector; size:UIntSize; A, B:Single ): IntBool;
function cusdVFx_hypotV( d_Z, d_X, d_Y:fVector; size:UIntSize; d_A, d_B:PSingle ): IntBool;
procedure VFcu_hypotV( h_Z, h_X, h_Y:fVector; size:UIntSize );
procedure VFxcu_hypotV( h_Z, h_X, h_Y:fVector; size:UIntSize; A, B:Single );
Descriptionnormal version: Yi = sqrt( Xi2 + Yi2 )
expanded version: Yi = sqrt( (A*Xi+B)2 + Yi2 )
These are variants of the Pythagoras formula for the hypotenuse of a right triangle.
Error handlingOVERFLOW errors lead to a default result of HUGE_VAL. (Intermediate overflows are avoided by appropriate scaling.)
Return valueFALSE (0), if no error occurred, otherwise TRUE (non-zero).
See alsoVF_redC,   VF_visC,   VCF_abs,   hypot

VectorLib Table of Contents  OptiVec home