summaryrefslogtreecommitdiff
path: root/source/xps
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2017-05-28 19:23:02 +0800
committerSebastian Rasmussen <sebras@gmail.com>2017-05-29 18:15:40 +0800
commit154efc3e429508bf27dbd31ebe66b6e1a26b7ded (patch)
tree6c02cc820dd732c0efc44fe401997b39b645bd11 /source/xps
parent2f987ef9812f74be9c272563d200e8ef1bac46ea (diff)
downloadmupdf-154efc3e429508bf27dbd31ebe66b6e1a26b7ded.tar.xz
Make PI/RADIAN/SQRT2/LN2 global single precision float constants.
Diffstat (limited to 'source/xps')
-rw-r--r--source/xps/xps-path.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/xps/xps-path.c b/source/xps/xps-path.c
index 731ffe9c..c60934a2 100644
--- a/source/xps/xps-path.c
+++ b/source/xps/xps-path.c
@@ -55,9 +55,9 @@ xps_draw_arc_segment(fz_context *ctx, xps_document *doc, fz_path *path, const fz
fz_point p;
while (th1 < th0)
- th1 += (float)M_PI * 2;
+ th1 += FZ_PI * 2;
- d = (float)M_PI / 180; /* 1-degree precision */
+ d = FZ_PI / 180; /* 1-degree precision */
if (iscw)
{
@@ -69,7 +69,7 @@ xps_draw_arc_segment(fz_context *ctx, xps_document *doc, fz_path *path, const fz
}
else
{
- th0 += (float)M_PI * 2;
+ th0 += FZ_PI * 2;
for (t = th0 - d; t > th1 + d/2; t -= d)
{
fz_transform_point_xy(&p, mtx, cosf(t), sinf(t));
@@ -202,9 +202,9 @@ xps_draw_arc(fz_context *ctx, xps_document *doc, fz_path *path,
th1 = angle_between(coord1, coord2);
dth = angle_between(coord3, coord4);
if (dth < 0 && !is_clockwise)
- dth += (((float)M_PI / 180) * 360);
+ dth += ((FZ_PI / 180) * 360);
if (dth > 0 && is_clockwise)
- dth -= (((float)M_PI / 180) * 360);
+ dth -= ((FZ_PI / 180) * 360);
}
fz_pre_scale(fz_pre_rotate(fz_translate(&mtx, cx, cy), rotation_angle), rx, ry);