Commit 5e8de224 authored by Jan Möbius's avatar Jan Möbius
Browse files

Fixed rotate vector



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6677 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6eecf4f3
......@@ -132,7 +132,10 @@ public:
/// rotate vector
Vec3 rotate(const Vec3& _v)
{ return *this * _v * conjugate(); }
{
Quaternion q = *this * Quaternion(_v) * conjugate();
return Vec3(q[1], q[2], q[3]);
}
/// get rotation axis and angle (only valid for unit quaternions!)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment