summaryrefslogtreecommitdiff
path: root/src/cairo-path-stroke.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2008-01-22 01:03:02 -0500
committerBehdad Esfahbod <behdad@behdad.org>2008-01-22 01:03:02 -0500
commit95f3b425e6fb31b364b08e53e072fac4f5ed0733 (patch)
tree49e623ab01ca18f5c09f5d30e36478c42ab144ba /src/cairo-path-stroke.c
parent1931ce1b3d491afe4f23670c82e428f95eb25e6d (diff)
[cairo-path-stroke] Use M_SQRT2 for constant value
Diffstat (limited to 'src/cairo-path-stroke.c')
-rw-r--r--src/cairo-path-stroke.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cairo-path-stroke.c b/src/cairo-path-stroke.c
index 9ebfce32..5705e0a4 100644
--- a/src/cairo-path-stroke.c
+++ b/src/cairo-path-stroke.c
@@ -1359,10 +1359,10 @@ _cairo_path_fixed_stroke_rectilinear (cairo_path_fixed_t *path,
if (stroke_style->line_join != CAIRO_LINE_JOIN_MITER)
return CAIRO_INT_STATUS_UNSUPPORTED;
/* If the miter limit turns right angles into bevels, then we
- * can't usethis optimization. Remember, the ratio is
- * 1/sin(ɸ/2). So the cutoff is 1/sin(π/4.0) or ⎷2 or
- * approximately 1.414213562373095, which we round for safety. */
- if (stroke_style->miter_limit < 1.415)
+ * can't use this optimization. Remember, the ratio is
+ * 1/sin(ɸ/2). So the cutoff is 1/sin(π/4.0) or ⎷2,
+ * which we round for safety. */
+ if (stroke_style->miter_limit < M_SQRT2)
return CAIRO_INT_STATUS_UNSUPPORTED;
if (stroke_style->dash)
return CAIRO_INT_STATUS_UNSUPPORTED;