diff --git a/source/blender/python/api2_2x/Mathutils.c b/source/blender/python/api2_2x/Mathutils.c index cf79b3071f7..65ae46ffccd 100644 --- a/source/blender/python/api2_2x/Mathutils.c +++ b/source/blender/python/api2_2x/Mathutils.c @@ -1,5 +1,5 @@ /* - * $Id: Mathutils.c 11502 2007-08-06 14:27:08Z khughes $ + * $Id$ * * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** * @@ -500,10 +500,7 @@ PyObject *M_Mathutils_AngleBetweenVecs(PyObject * self, PyObject * args) } dot /= (sqrt(test_v1) * sqrt(test_v2)); - if (dot < -1.0f || dot > 1.0f) { - CLAMP(dot,-1.0f,1.0f); - } - angleRads = (double)acos(dot); + angleRads = (double)saacos(dot); return PyFloat_FromDouble(angleRads * (180/ Py_PI)); diff --git a/source/blender/python/api2_2x/quat.c b/source/blender/python/api2_2x/quat.c index 19e749f187c..a4a99c28d72 100644 --- a/source/blender/python/api2_2x/quat.c +++ b/source/blender/python/api2_2x/quat.c @@ -1,5 +1,5 @@ /* - * $Id: quat.c 12314 2007-10-20 20:24:09Z campbellbarton $ + * $Id$ * * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** * @@ -184,13 +184,13 @@ static PyObject *Quaternion_getattr(QuaternionObject * self, char *name) } if(STREQ(name, "angle")) { mag = self->quat[0]; - mag = 2 * (acos(mag)); + mag = 2 * (saacos(mag)); mag *= (180 / Py_PI); return PyFloat_FromDouble(mag); } if(STREQ(name, "axis")) { mag = self->quat[0] * (Py_PI / 180); - mag = 2 * (acos(mag)); + mag = 2 * (saacos(mag)); mag = sin(mag / 2); for(x = 0; x < 3; x++) { vec[x] = (float)(self->quat[x + 1] / mag);