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:
authorCampbell Barton <ideasman42@gmail.com>2011-03-27 19:54:20 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-03-27 19:54:20 +0400
commit59cdbfd8849315984e280b92968d6cf1d9d44c4b (patch)
treecc5cafe931596dc98d6761d07bb766f929ef13c5 /source/blender/blenlib/intern/math_matrix.c
parent617e6a83bc89ca36e18bd06d851a31c010e11db2 (diff)
math lib and UV project: floats were being implicitly promoted to doubles, adjust to use floats.
Diffstat (limited to 'source/blender/blenlib/intern/math_matrix.c')
-rw-r--r--source/blender/blenlib/intern/math_matrix.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index 289d279c9a1..9fde87d734f 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -535,7 +535,7 @@ int invert_m4_m4(float inverse[4][4], float mat[4][4])
max = fabs(tempmat[i][i]);
maxj = i;
for(j = i + 1; j < 4; j++) {
- if(fabs(tempmat[j][i]) > max) {
+ if(fabsf(tempmat[j][i]) > max) {
max = fabs(tempmat[j][i]);
maxj = j;
}
@@ -760,13 +760,13 @@ void orthogonalize_m4(float mat[][4], int axis)
int is_orthogonal_m3(float mat[][3])
{
- if (fabs(dot_v3v3(mat[0], mat[1])) > 1.5 * FLT_EPSILON)
+ if (fabsf(dot_v3v3(mat[0], mat[1])) > 1.5f * FLT_EPSILON)
return 0;
- if (fabs(dot_v3v3(mat[1], mat[2])) > 1.5 * FLT_EPSILON)
+ if (fabsf(dot_v3v3(mat[1], mat[2])) > 1.5f * FLT_EPSILON)
return 0;
- if (fabs(dot_v3v3(mat[0], mat[2])) > 1.5 * FLT_EPSILON)
+ if (fabsf(dot_v3v3(mat[0], mat[2])) > 1.5f * FLT_EPSILON)
return 0;
return 1;
@@ -774,13 +774,13 @@ int is_orthogonal_m3(float mat[][3])
int is_orthogonal_m4(float mat[][4])
{
- if (fabs(dot_v3v3(mat[0], mat[1])) > 1.5 * FLT_EPSILON)
+ if (fabsf(dot_v3v3(mat[0], mat[1])) > 1.5f * FLT_EPSILON)
return 0;
- if (fabs(dot_v3v3(mat[1], mat[2])) > 1.5 * FLT_EPSILON)
+ if (fabsf(dot_v3v3(mat[1], mat[2])) > 1.5f * FLT_EPSILON)
return 0;
- if (fabs(dot_v3v3(mat[0], mat[2])) > 1.5 * FLT_EPSILON)
+ if (fabsf(dot_v3v3(mat[0], mat[2])) > 1.5f * FLT_EPSILON)
return 0;
return 1;
@@ -806,11 +806,11 @@ void normalize_m4(float mat[][4])
float len;
len= normalize_v3(mat[0]);
- if(len!=0.0) mat[0][3]/= len;
+ if(len!=0.0f) mat[0][3]/= len;
len= normalize_v3(mat[1]);
- if(len!=0.0) mat[1][3]/= len;
+ if(len!=0.0f) mat[1][3]/= len;
len= normalize_v3(mat[2]);
- if(len!=0.0) mat[2][3]/= len;
+ if(len!=0.0f) mat[2][3]/= len;
}
void normalize_m4_m4(float rmat[][4], float mat[][4])
@@ -818,11 +818,11 @@ void normalize_m4_m4(float rmat[][4], float mat[][4])
float len;
len= normalize_v3_v3(rmat[0], mat[0]);
- if(len!=0.0) rmat[0][3]= mat[0][3] / len;
+ if(len!=0.0f) rmat[0][3]= mat[0][3] / len;
len= normalize_v3_v3(rmat[1], mat[1]);
- if(len!=0.0) rmat[1][3]= mat[1][3] / len;
+ if(len!=0.0f) rmat[1][3]= mat[1][3] / len;
len= normalize_v3_v3(rmat[2], mat[2]);
- if(len!=0.0) rmat[2][3]= mat[2][3] / len;;
+ if(len!=0.0f) rmat[2][3]= mat[2][3] / len;;
}
void adjoint_m3_m3(float m1[][3], float m[][3])