imbuf, mathutils & readfile: floats were being implicitly promoted to doubles, adjust...
[blender.git] / source / blender / python / generic / mathutils_Matrix.c
index c048058f63c198e5db76891aafb83d8781d2a700..936c761bf90d5362bf1fcb52411331666de47db8 100644 (file)
@@ -542,7 +542,7 @@ static PyObject *C_Matrix_Shear(PyObject *cls, PyObject *args)
        if(matSize == 2) {
                float const factor= PyFloat_AsDouble(fac);
 
-               if(factor==-1.0 && PyErr_Occurred()) {
+               if(factor==-1.0f && PyErr_Occurred()) {
                        PyErr_SetString(PyExc_AttributeError, "mathutils.Matrix.Shear(): the factor to be a float");
                        return NULL;
                }
@@ -1520,12 +1520,12 @@ static PyObject *Matrix_mul(PyObject * m1, PyObject * m2)
                }
        }
        else if(mat2) {
-               if (((scalar= PyFloat_AsDouble(m1)) == -1.0 && PyErr_Occurred())==0) { /*FLOAT/INT * MATRIX */
+               if (((scalar= PyFloat_AsDouble(m1)) == -1.0f && PyErr_Occurred())==0) { /*FLOAT/INT * MATRIX */
                        return matrix_mul_float(mat2, scalar);
                }
        }
        else if(mat1) {
-               if (((scalar= PyFloat_AsDouble(m2)) == -1.0 && PyErr_Occurred())==0) { /*FLOAT/INT * MATRIX */
+               if (((scalar= PyFloat_AsDouble(m2)) == -1.0f && PyErr_Occurred())==0) { /*FLOAT/INT * MATRIX */
                        return matrix_mul_float(mat1, scalar);
                }
        }