Go to the source code of this file.
Functions | |
double | abs (const vec &v) |
double | norm (const vec &v) |
vec | normal (const vec &v) |
vec | rotate (const vec &v, const quat &q) |
vec | orbit (const vec &v, const quat &q) |
|
return abs Definition at line 17 of file vec-calc.hpp. 00018 { 00019 #ifdef QVM_DEBUG 00020 double result(std::sqrt(v.x*v.x +v.y*v.y +v.z*v.z)); 00021 if( result < DBL_MIN || !finite(result) ){ 00022 std::cerr << "[WARNING] abs(const vec&) " 00023 << "The abs is numerically ZERO." << std::endl; 00024 } 00025 #endif//QVM_DEBUG 00026 return std::sqrt(v.x*v.x +v.y*v.y +v.z*v.z) +DBL_MIN; 00027 }
|
|
return norm Definition at line 31 of file vec-calc.hpp. 00032 { 00033 #ifdef QVM_DEBUG 00034 double result(v.x*v.x +v.y*v.y +v.z*v.z); 00035 if( result < DBL_MIN || !finite(result) ){ 00036 std::cerr << "[WARNING] norm(const vec&) " 00037 << "The norm is numerically ZERO." << std::endl; 00038 } 00039 #endif//QVM_DEBUG 00040 return v.x*v.x +v.y*v.y +v.z*v.z; 00041 }
|
|
return the normalized vec Definition at line 45 of file vec-calc.hpp. References abs().
|
|
Definition at line 53 of file vec-calc.hpp. References conj(), im(), and vr2q().
|
|
Definition at line 61 of file vec-calc.hpp. References conj(), im(), and vr2q().
|