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:
authorJoseph Gilbert <ascotan@gmail.com>2005-10-10 21:57:53 +0400
committerJoseph Gilbert <ascotan@gmail.com>2005-10-10 21:57:53 +0400
commit9b8868532a9e0970f83eb68ef36144eaca9525a1 (patch)
treed89b193841e691ff401e072c427c02dcbf0e5c72 /source/blender/python/api2_2x/Mathutils.c
parent7f626785714b3011daaca718b79e7690c68d29a8 (diff)
-mathutils fix
* cos takes -1 to +1
Diffstat (limited to 'source/blender/python/api2_2x/Mathutils.c')
-rw-r--r--source/blender/python/api2_2x/Mathutils.c2
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));