Functions | |
template<int N, typename T> | |
T | geom::computeDotProduct (const ads::FixedArray< N, T > &x, const ads::FixedArray< N, T > &y) |
Return the dot product of x and y. | |
template<typename T> | |
ads::FixedArray< 3, T > | geom::computeCrossProduct (const ads::FixedArray< 3, T > &x, const ads::FixedArray< 3, T > &y) |
Return the cross product of x and y. | |
template<typename T> | |
void | geom::computeCrossProduct (const ads::FixedArray< 3, T > &x, const ads::FixedArray< 3, T > &y, ads::FixedArray< 3, T > *result) |
Compute the cross product of x and y. | |
template<typename T> | |
T | geom::computeTripleProduct (const ads::FixedArray< 3, T > &a, const ads::FixedArray< 3, T > &b, const ads::FixedArray< 3, T > &c) |
The scalar triple product of three vectors: ![]() | |
template<typename T> | |
T | geom::computeDiscriminant (const ads::FixedArray< 2, T > &p, const ads::FixedArray< 2, T > &q) |
Return the discriminant of the vectors. | |
template<typename T> | |
void | geom::computeAnOrthogonalVector (const ads::FixedArray< 3, T > &vector, ads::FixedArray< 3, T > *orthogonal) |
Compute an orthogonal vector. |
void geom::computeCrossProduct | ( | const ads::FixedArray< 3, T > & | x, | |
const ads::FixedArray< 3, T > & | y, | |||
ads::FixedArray< 3, T > * | result | |||
) |
Compute the cross product of x and y.
This exists as an optimization of geom::cross(). With this function there is no need to construct an ads::FixedArray.
T geom::computeDotProduct | ( | const ads::FixedArray< N, T > & | x, | |
const ads::FixedArray< N, T > & | y | |||
) |
Return the dot product of x and y.
This has specializations for 1, 2 and 3-D.