Fixed quaternion rotate

This commit is contained in:
Tea 2024-05-23 18:56:40 +02:00
parent 45008b225e
commit b7e770e501

View File

@ -18,7 +18,7 @@ namespace glm
T const AngleRad(angle); T const AngleRad(angle);
T const Sin = sin(AngleRad * static_cast<T>(0.5)); T const Sin = sin(AngleRad * static_cast<T>(0.5));
return q * qua<T, Q>::wxyz(cos(AngleRad * static_cast<T>(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin); return qua<T, Q>::wxyz(cos(AngleRad * static_cast<T>(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin) * q;
} }
}//namespace glm }//namespace glm