summaryrefslogtreecommitdiff
path: root/src/cairo-matrix.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2008-05-25 00:55:36 -0400
committerBehdad Esfahbod <behdad@behdad.org>2008-05-25 00:55:36 -0400
commit0621f412ff7986bc883a613d332f121da62e38fe (patch)
tree41a242625e1202ff71ec1d00b307a1aa38324802 /src/cairo-matrix.c
parent9827dae57085f9452889499ff799c378abd5c60e (diff)
downloadcairo-0621f412ff7986bc883a613d332f121da62e38fe.tar.gz
[cairo-matrix] Move IS_FINITE(det) checks before det==0 checks
I'm still getting floating point exceptions in test suite in a made-to-overflow test though. Not sure why isfinite() doesn't work.
Diffstat (limited to 'src/cairo-matrix.c')
-rw-r--r--src/cairo-matrix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cairo-matrix.c b/src/cairo-matrix.c
index b74327337..b704cdee0 100644
--- a/src/cairo-matrix.c
+++ b/src/cairo-matrix.c
@@ -490,10 +490,10 @@ cairo_matrix_invert (cairo_matrix_t *matrix)
_cairo_matrix_compute_determinant (matrix, &det);
- if (det == 0)
+ if (! ISFINITE (det))
return _cairo_error (CAIRO_STATUS_INVALID_MATRIX);
- if (! ISFINITE (det))
+ if (det == 0)
return _cairo_error (CAIRO_STATUS_INVALID_MATRIX);
_cairo_matrix_compute_adjoint (matrix);
@@ -510,7 +510,7 @@ _cairo_matrix_is_invertible (const cairo_matrix_t *matrix)
_cairo_matrix_compute_determinant (matrix, &det);
- return det != 0. && ISFINITE (det);
+ return ISFINITE (det) && det != 0.;
}
void