mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
Quaternion: replace conversion in rotate() with AxisAngle call
This commit is contained in:
parent
b241cf5c95
commit
ee2219b836
@ -330,14 +330,12 @@ public:
|
||||
|
||||
/**
|
||||
* Rotate quaternion from rotation vector
|
||||
* TODO replace with AxisAngle call
|
||||
*
|
||||
* @param vec rotation vector
|
||||
*/
|
||||
void rotate(const Vector<Type, 3> &vec)
|
||||
void rotate(const AxisAngle<Type> &vec)
|
||||
{
|
||||
Quaternion res;
|
||||
res.from_axis_angle(vec);
|
||||
Quaternion res(vec);
|
||||
(*this) = res * (*this);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user