From 8c7e1b648b782542c4906ccb849c39b167265558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Sat, 31 Jan 2015 14:34:27 +0100 Subject: 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. --- source/blender/python/mathutils/mathutils_Quaternion.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/python') diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c index d422634a496..98ee2fbd7cc 100644 --- a/source/blender/python/mathutils/mathutils_Quaternion.c +++ b/source/blender/python/mathutils/mathutils_Quaternion.c @@ -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" -- cgit v1.2.3