Fix: correctly describing Quaternion.normalize()

The original comment seems to suggest that only the rotation vector
is normalized, leaving the rotation angle alone. This is not what happens,
though. The new comment matches the actual implementation, and the
implementation matches what is commonly understood as quaternion
normalization.
This commit is contained in:
Sybren A. Stüvel 2015-01-31 14:34:27 +01:00
parent 01ec66423c
commit 8c7e1b648b
1 changed files with 2 additions and 1 deletions

View File

@ -334,7 +334,8 @@ static PyObject *Quaternion_rotate(QuaternionObject *self, PyObject *value)
}
/* ----------------------------Quaternion.normalize()---------------- */
/* normalize the axis of rotation of [theta, vector] */
/* Normalize the quaternion. This may change the angle as well as the
* rotation axis, as all of (w, x, y, z) are scaled. */
PyDoc_STRVAR(Quaternion_normalize_doc,
".. function:: normalize()\n"
"\n"