AP_Math: add quaternion.initialise

This commit is contained in:
Randy Mackay 2015-05-01 15:54:54 +09:00
parent c366fbbc96
commit eaedeeb7bf

View File

@ -98,6 +98,9 @@ public:
float length(void) const; float length(void) const;
void normalize(); void normalize();
// initialise the quaternion to no rotation
void initialise() { q1 = 1.0f; q2 = q3 = q4 = 0.0f; }
Quaternion inverse(void) const; Quaternion inverse(void) const;
// allow a quaternion to be used as an array, 0 indexed // allow a quaternion to be used as an array, 0 indexed