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>2014-04-01 04:34:00 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-01 08:22:28 +0400
commit617557b08ea94e2b65a1697ddf0b79651204d92b (patch)
tree50b24bab075b42fa20456140c9a9681cfb01325b /source/blender/blenlib/intern/math_matrix.c
parent2c00ecc738c04dc5dc22d4a6b81a1e937526ba6d (diff)
Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define
Diffstat (limited to 'source/blender/blenlib/intern/math_matrix.c')
-rw-r--r--source/blender/blenlib/intern/math_matrix.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index cfcbd0bce72..4cbe1a76f58 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -601,10 +601,10 @@ float determinant_m3_array(float m[3][3])
m[2][0] * (m[0][1] * m[1][2] - m[0][2] * m[1][1]));
}
-int invert_m3_ex(float m[3][3], const float epsilon)
+bool invert_m3_ex(float m[3][3], const float epsilon)
{
float tmp[3][3];
- int success;
+ bool success;
success = invert_m3_m3_ex(tmp, m, epsilon);
copy_m3_m3(m, tmp);
@@ -612,10 +612,11 @@ int invert_m3_ex(float m[3][3], const float epsilon)
return success;
}
-int invert_m3_m3_ex(float m1[3][3], float m2[3][3], const float epsilon)
+bool invert_m3_m3_ex(float m1[3][3], float m2[3][3], const float epsilon)
{
float det;
- int a, b, success;
+ int a, b;
+ bool success;
BLI_assert(epsilon >= 0.0f);
@@ -638,10 +639,10 @@ int invert_m3_m3_ex(float m1[3][3], float m2[3][3], const float epsilon)
return success;
}
-int invert_m3(float m[3][3])
+bool invert_m3(float m[3][3])
{
float tmp[3][3];
- int success;
+ bool success;
success = invert_m3_m3(tmp, m);
copy_m3_m3(m, tmp);
@@ -649,10 +650,11 @@ int invert_m3(float m[3][3])
return success;
}
-int invert_m3_m3(float m1[3][3], float m2[3][3])
+bool invert_m3_m3(float m1[3][3], float m2[3][3])
{
float det;
- int a, b, success;
+ int a, b;
+ bool success;
/* calc adjoint */
adjoint_m3_m3(m1, m2);
@@ -674,10 +676,10 @@ int invert_m3_m3(float m1[3][3], float m2[3][3])
return success;
}
-int invert_m4(float m[4][4])
+bool invert_m4(float m[4][4])
{
float tmp[4][4];
- int success;
+ bool success;
success = invert_m4_m4(tmp, m);
copy_m4_m4(m, tmp);
@@ -688,13 +690,13 @@ int invert_m4(float m[4][4])
/*
* invertmat -
* computes the inverse of mat and puts it in inverse. Returns
- * TRUE on success (i.e. can always find a pivot) and FALSE on failure.
+ * true on success (i.e. can always find a pivot) and false on failure.
* Uses Gaussian Elimination with partial (maximal column) pivoting.
*
* Mark Segal - 1992
*/
-int invert_m4_m4(float inverse[4][4], float mat[4][4])
+bool invert_m4_m4(float inverse[4][4], float mat[4][4])
{
int i, j, k;
double temp;