diff options
author | Joseph Gilbert <ascotan@gmail.com> | 2005-10-10 21:57:53 +0400 |
---|---|---|
committer | Joseph Gilbert <ascotan@gmail.com> | 2005-10-10 21:57:53 +0400 |
commit | 9b8868532a9e0970f83eb68ef36144eaca9525a1 (patch) | |
tree | d89b193841e691ff401e072c427c02dcbf0e5c72 /source/blender | |
parent | 7f626785714b3011daaca718b79e7690c68d29a8 (diff) |
-mathutils fix
* cos takes -1 to +1
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/python/api2_2x/Mathutils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Mathutils.c b/source/blender/python/api2_2x/Mathutils.c index 8bd3beabf1d..d2ab6d96f6b 100644 --- a/source/blender/python/api2_2x/Mathutils.c +++ b/source/blender/python/api2_2x/Mathutils.c @@ -485,7 +485,7 @@ PyObject *M_Mathutils_AngleBetweenVecs(PyObject * self, PyObject * args) dot += vec1->vec[x] * vec2->vec[x]; } dot /= (sqrt(test_v1) * sqrt(test_v2)); - CLAMP(dot,0.0f,1.0f); + CLAMP(dot,-1.0f,1.0f); angleRads = (double)acos(dot); return PyFloat_FromDouble(angleRads * (180 / Py_PI)); |