Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2010-06-23 06:42:39 +0400
committerMartin Poirier <theeth@yahoo.com>2010-06-23 06:42:39 +0400
commit5ed7699e85620ec5d64e1af824a4b809ea9ea574 (patch)
tree8aa6d88e7fb51b01865e72d522041ec522848290 /source/blender/python
parent8a6ea2584dcfdb0fe3e8fcf4d61825b505fec30a (diff)
mathutils.RotationMatrix
Angles are in radians. Doc and example should reflect reality
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/doc/examples/mathutils.py3
-rw-r--r--source/blender/python/generic/mathutils.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/python/doc/examples/mathutils.py b/source/blender/python/doc/examples/mathutils.py
index dee8fa4d6bd..6cd11a1baaa 100644
--- a/source/blender/python/doc/examples/mathutils.py
+++ b/source/blender/python/doc/examples/mathutils.py
@@ -1,8 +1,9 @@
import mathutils
+from math import radians
vec = mathutils.Vector(1.0, 2.0, 3.0)
-mat_rot = mathutils.RotationMatrix(90, 4, 'X')
+mat_rot = mathutils.RotationMatrix(radians(90), 4, 'X')
mat_trans = mathutils.TranslationMatrix(vec)
mat = mat_trans * mat_rot
diff --git a/source/blender/python/generic/mathutils.c b/source/blender/python/generic/mathutils.c
index 95be795dd4e..f0571f32f58 100644
--- a/source/blender/python/generic/mathutils.c
+++ b/source/blender/python/generic/mathutils.c
@@ -168,7 +168,7 @@ static char M_Mathutils_RotationMatrix_doc[] =
"\n"
" Create a matrix representing a rotation.\n"
"\n"
-" :arg angle: The angle of rotation desired.\n"
+" :arg angle: The angle of rotation desired, in radians.\n"
" :type angle: float\n"
" :arg size: The size of the rotation matrix to construct [2, 4].\n"
" :type size: int\n"