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).
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user