summaryrefslogtreecommitdiff
path: root/src/cairo-pen.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-08-08 09:11:10 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2008-08-08 09:11:10 +0100
commit49fb0e834ecf31ac61735e2e35a1b486d5290db6 (patch)
tree26a433059dd654e33c7fd5cd17b2e66697152d04 /src/cairo-pen.c
parenteabe572981e1e415171dbfde81c3bf94297355b4 (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.c8
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,