imbuf, mathutils & readfile: floats were being implicitly promoted to doubles, adjust to use floats.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user