Fraxinus
18.10
An IGT application
|
#include <cmath>
Go to the source code of this file.
Macros | |
#define | radToDeg(x) (180.0*x/M_PI) |
#define | degToRad(x) (M_PI*x/180.0) |
Functions | |
template<typename T > | |
int | sgn (T val) |
template<typename T > | |
T | length3d (T const a[3]) |
template<typename T > | |
void | normalize3d (T normalized[3], T const toNormalize[3]) |
template<typename T > | |
T | innerProduct (T const one[3], T const two[3]) |
#define degToRad | ( | x | ) | (M_PI*x/180.0) |
Definition at line 59 of file helpers.hpp.
#define radToDeg | ( | x | ) | (180.0*x/M_PI) |
Definition at line 58 of file helpers.hpp.
T innerProduct | ( | T const | one[3], |
T const | two[3] | ||
) |
Calculate the inner product of two vectors
one | the first vector |
two | the second vector |
Definition at line 48 of file helpers.hpp.
T length3d | ( | T const | a[3] | ) |
Calculate the length of a 3D vector
a | the 3d vector |
Definition at line 19 of file helpers.hpp.
void normalize3d | ( | T | normalized[3], |
T const | toNormalize[3] | ||
) |
Normalize a 3d vector
normalized | the normalized vector is stored here |
toNormalize | the vector to normalize |
Definition at line 34 of file helpers.hpp.
int sgn | ( | T | val | ) |
Definition at line 9 of file helpers.hpp.