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:
authorTon Roosendaal <ton@blender.org>2005-10-28 14:09:46 +0400
committerTon Roosendaal <ton@blender.org>2005-10-28 14:09:46 +0400
commit4069604736c59dfb07caaac925b2291a5982e5e7 (patch)
treedf0782c67bc20a8f400ae542a173cdb440470958 /source/blender/python/api2_2x/Mathutils.c
parent595447a85ea2e388fa17b4a44dacf256ac97f343 (diff)
Fixed gcc warnings for unused var and unitialiazed vars.
NOTE: I had to fix NMesh.c, Mesh_fromNMesh(), that is a real bad function... it was returning a Py object as a Mesh (on error). This is still not really solved (NULL return is not handled).
Diffstat (limited to 'source/blender/python/api2_2x/Mathutils.c')
-rw-r--r--source/blender/python/api2_2x/Mathutils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Mathutils.c b/source/blender/python/api2_2x/Mathutils.c
index 966fabc7ff5..dac61060223 100644
--- a/source/blender/python/api2_2x/Mathutils.c
+++ b/source/blender/python/api2_2x/Mathutils.c
@@ -486,8 +486,9 @@ PyObject *M_Mathutils_AngleBetweenVecs(PyObject * self, PyObject * args)
}
dot /= (sqrt(test_v1) * sqrt(test_v2));
- if (dot < -1.0f || dot > 1.0f)
+ if (dot < -1.0f || dot > 1.0f) {
CLAMP(dot,-1.0f,1.0f);
+ }
angleRads = (double)acos(dot);
return PyFloat_FromDouble(angleRads * (180/ Py_PI));