8 template <
class T,
bool Packed>
14 template <
class T,
bool Packed>
20 template <
class T,
bool Packed>
34 template <
class T,
bool Packed>
39 Quaternion ret = { std::log(magq), vn * std::acos(q.
s / magq) };
44 template <
class T,
bool Packed>
52 template <
class T,
bool Packed>
59 template <
class T,
bool Packed>
65 template <
class T,
bool Packed>
71 template <
class T,
bool Packed>
77 template <
class T,
bool Packed>
79 return q.
vec.IsNormalized();
Matrix< T, Dim, Dim, Order, Layout, Packed > Inverse(const Matrix< T, Dim, Dim, Order, Layout, Packed > &m)
Returns the inverse of the matrix.
Definition: MatrixFunction.hpp:46
Quaternion< T, Packed > Log(const Quaternion< T, Packed > &q)
Natural quaternion logarithm, base e.
Definition: QuaternionFunction.hpp:35
Quaternion< T, Packed > Pow(const Quaternion< T, Packed > &q, T a)
Raises q to the power of a .
Definition: QuaternionFunction.hpp:45
Allows you to do quaternion math and represent rotation in a compact way.
Definition: Definitions.hpp:69
Quaternion< T, Packed > Normalize(const Quaternion< T, Packed > &q)
Returns the unit quaternion of the same direction. Does not change this object.
Definition: QuaternionFunction.hpp:66
T Abs(const Quaternion< T, Packed > &q)
The euclidean length of the vector of the 4 elements of the quaternion.
Definition: QuaternionFunction.hpp:9
Quaternion< T, Packed > Exp(const Quaternion< T, Packed > &q)
Natural quaternion exponentiation, base e.
Definition: QuaternionFunction.hpp:21
const T ScalarPart() const
Returns the scalar part (w) of (w + xi + yj + zk).
Definition: QuaternionImpl.hpp:144
Definition: Approx.hpp:11
const Vector< T, 3, Packed > VectorPart() const
Returns the vector part (x, y, z) of (w + xi + yj + zk).
Definition: QuaternionImpl.hpp:148
T LengthSquared(const Quaternion< T, Packed > &q)
Returns the square of the absolute value.
Definition: QuaternionFunction.hpp:53
Quaternion< T, Packed > Conjugate(const Quaternion< T, Packed > &q)
Negates the imaginary values of the quaternion.
Definition: QuaternionFunction.hpp:15
Vector< T, 4, Packed > vec
Definition: QuaternionImpl.hpp:41
T Length(const Quaternion< T, Packed > &q)
Returns the absolute value of the quaternion.
Definition: QuaternionFunction.hpp:60
T s
Definition: QuaternionImpl.hpp:36
bool IsNormalized(const Quaternion< T, Packed > &q)
Check if the quaternion is a unit quaternion, with some tolerance for floats.
Definition: QuaternionFunction.hpp:78