diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2015-05-01 17:19:06 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2015-05-01 20:21:41 +0300 |
commit | b6caefdaa9f90159b6c058ef245cc9b8d4a110fa (patch) | |
tree | 5e8bdc98b2c3c626ebbd4431f41e0510e969c73a /source/blender/blenlib/intern/math_matrix.c | |
parent | bf7098a93f5a8b45e94795a99c8fb8942b3ac1c6 (diff) |
Fix T43711: dual quaternion deform bug with shearing in deform matrix.
This also increases the tolerances in is_orthogonal / is_orthonormal functions,
which were much too low for practical purposes.
Diffstat (limited to 'source/blender/blenlib/intern/math_matrix.c')
-rw-r--r-- | source/blender/blenlib/intern/math_matrix.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index 773bb419c9b..081c555ed6f 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -1159,7 +1159,7 @@ bool is_orthogonal_m3(float m[3][3]) for (i = 0; i < 3; i++) { for (j = 0; j < i; j++) { - if (fabsf(dot_v3v3(m[i], m[j])) > 1.5f * FLT_EPSILON) + if (fabsf(dot_v3v3(m[i], m[j])) > 1e-5f) return false; } } @@ -1173,7 +1173,7 @@ bool is_orthogonal_m4(float m[4][4]) for (i = 0; i < 4; i++) { for (j = 0; j < i; j++) { - if (fabsf(dot_v4v4(m[i], m[j])) > 1.5f * FLT_EPSILON) + if (fabsf(dot_v4v4(m[i], m[j])) > 1e-5f) return false; } @@ -1188,7 +1188,7 @@ bool is_orthonormal_m3(float m[3][3]) int i; for (i = 0; i < 3; i++) - if (fabsf(dot_v3v3(m[i], m[i]) - 1) > 1.5f * FLT_EPSILON) + if (fabsf(dot_v3v3(m[i], m[i]) - 1) > 1e-5f) return false; return true; @@ -1203,7 +1203,7 @@ bool is_orthonormal_m4(float m[4][4]) int i; for (i = 0; i < 4; i++) - if (fabsf(dot_v4v4(m[i], m[i]) - 1) > 1.5f * FLT_EPSILON) + if (fabsf(dot_v4v4(m[i], m[i]) - 1) > 1e-5f) return false; return true; |