| VF_hypotV | VD_hypotV | VE_hypotV |
| VFx_hypotV | VDx_hypotV | VEx_hypotV |
|
| Funktion | Hypotenuse (Pythagoras-Funktion) |
|
| 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/Delphi | uses VFmath;
function VF_hypotV( Z, X, Y:fVector; size:UIntSize ): IntBool;
function VFx_hypotV( Z, X, Y:fVector; size:UIntSize; A, B:Single ): IntBool; |
|
| Beschreibung | normale Version: Yi = sqrt( Xi2 + Yi2 )
erweiterte Version: Yi = sqrt( (A*Xi+B)2 + Yi2 )
Diese Funktionen sind Varianten des Pythagoras-Theorems zur Berechnung der Hypotenuse eines rechtwinkligen Dreiecks. |
|
| Fehlerbehandlung | OVERFLOW-Fehler ergeben HUGE_VAL. Im Unterschied zu der Behandlung der ANSI-C-Funktion hypot bei vielen Compilern wird ein Überlauf des Zwischenergebnisses Xi2 + Yi2 durch geeignete Maßnahmen ausgeschlossen. |
|
| Rückgabewert | FALSE (0), wenn fehlerfrei, andernfalls TRUE (!= 0). |
|
|