Update comments in QQuaternion::getEulerAngles
A comment from the patch 6ffc8d8eb6
is a little ambiguous. This patch is just to give information
about the modification.
Task-number: QTBUG-72103
Pick-to: 6.3 6.2 5.15
Change-Id: I6bfc3ae926c118de0d969a4b44f438c24f8d4f72
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
6625a4744e
commit
8f9049ddbc
@ -495,8 +495,9 @@ void QQuaternion::getEulerAngles(float *pitch, float *yaw, float *roll) const
|
|||||||
// https://ingmec.ual.es/~jlblanco/papers/jlblanco2010geometry3D_techrep.pdf
|
// https://ingmec.ual.es/~jlblanco/papers/jlblanco2010geometry3D_techrep.pdf
|
||||||
// "A tutorial on SE(3) transformation parameterizations and on-manifold optimization".
|
// "A tutorial on SE(3) transformation parameterizations and on-manifold optimization".
|
||||||
|
|
||||||
// Normalize values even if the length is below the margin. Otherwise we might fail
|
// We can only detect Gimbal lock when we normalize, which we can't do when
|
||||||
// to detect Gimbal lock due to cumulative errors.
|
// length is nearly zero. Do so before multiplying co-ordinates, to avoid
|
||||||
|
// underflow.
|
||||||
const float len = length();
|
const float len = length();
|
||||||
const bool rescale = !qFuzzyIsNull(len);
|
const bool rescale = !qFuzzyIsNull(len);
|
||||||
const float xps = rescale ? xp / len : xp;
|
const float xps = rescale ? xp / len : xp;
|
||||||
|
Loading…
Reference in New Issue
Block a user