diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-08-08 09:11:10 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-08-08 09:11:10 +0100 |
commit | 49fb0e834ecf31ac61735e2e35a1b486d5290db6 (patch) | |
tree | 26a433059dd654e33c7fd5cd17b2e66697152d04 /src/cairo-pen.c | |
parent | eabe572981e1e415171dbfde81c3bf94297355b4 (diff) |
[matrix] Prefer a return parameter for _compute_determinant().
Returning a double tends to be slightly more efficient than passing a
pointer to fill, and is a lot easier to read.
Diffstat (limited to 'src/cairo-pen.c')
-rw-r--r-- | src/cairo-pen.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/cairo-pen.c b/src/cairo-pen.c index 4a882d56..425b3b96 100644 --- a/src/cairo-pen.c +++ b/src/cairo-pen.c @@ -53,17 +53,11 @@ _cairo_pen_init (cairo_pen_t *pen, { int i; int reflect; - double det; pen->radius = radius; pen->tolerance = tolerance; - _cairo_matrix_compute_determinant (ctm, &det); - if (det >= 0) { - reflect = 0; - } else { - reflect = 1; - } + reflect = _cairo_matrix_compute_determinant (ctm) < 0.; pen->num_vertices = _cairo_pen_vertices_needed (tolerance, radius, |