34 #ifndef TURBOMATH_TURBOMATH_H 35 #define TURBOMATH_TURBOMATH_H 46 float atan2(
float y,
float x);
73 Vector(
float x_,
float y_,
float z_);
76 float sqrd_norm()
const;
80 float dot(
const Vector &v)
const;
86 Vector &operator*= (
float s);
87 Vector &operator/= (
float s);
113 Quaternion(
float w_,
float x_,
float y_,
float z_);
115 Quaternion(
float roll,
float pitch,
float yaw);
122 Quaternion &from_RPY(
float roll,
float pitch,
float yaw);
123 void get_RPY(
float *roll,
float *pitch,
float *yaw)
const;
132 float norm_v = v.norm();
137 out.
x = out.
y = out.
z = 0.0;
141 out = 2.0*
atan2(norm_v, q.
w)*v/norm_v;
154 #endif // TURBOMATH_TURBOMATH_H
Vector operator*(float s, const Vector &v)
float atan2(float y, float x)
Vector operator-(const Quaternion &q) const
Vector operator/(float s, const Vector &v)
static Vector log(const Quaternion &q)