summaryrefslogtreecommitdiff
path: root/source/pdf
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/pdf
parent2f987ef9812f74be9c272563d200e8ef1bac46ea (diff)
downloadmupdf-154efc3e429508bf27dbd31ebe66b6e1a26b7ded.tar.xz
Make PI/RADIAN/SQRT2/LN2 global single precision float constants.
Diffstat (limited to 'source/pdf')
-rw-r--r--source/pdf/pdf-function.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/pdf/pdf-function.c b/source/pdf/pdf-function.c
index 1c1b4454..1e53291e 100644
--- a/source/pdf/pdf-function.c
+++ b/source/pdf/pdf-function.c
@@ -84,8 +84,6 @@ pdf_function_size(fz_context *ctx, pdf_function *func)
return (func ? func->size : 0);
}
-#define RADIAN 57.2957795
-
static inline float lerp(float x, float xmin, float xmax, float ymin, float ymax)
{
if (xmin == xmax)
@@ -383,7 +381,7 @@ ps_run(fz_context *ctx, psobj *code, ps_stack *st, int pc)
case PS_OP_ATAN:
r2 = ps_pop_real(st);
r1 = ps_pop_real(st);
- r1 = atan2f(r1, r2) * RADIAN;
+ r1 = atan2f(r1, r2) * FZ_RADIAN;
if (r1 < 0)
r1 += 360;
ps_push_real(st, r1);
@@ -411,7 +409,7 @@ ps_run(fz_context *ctx, psobj *code, ps_stack *st, int pc)
case PS_OP_COS:
r1 = ps_pop_real(st);
- ps_push_real(st, cosf(r1/RADIAN));
+ ps_push_real(st, cosf(r1/FZ_RADIAN));
break;
case PS_OP_CVI:
@@ -636,7 +634,7 @@ ps_run(fz_context *ctx, psobj *code, ps_stack *st, int pc)
case PS_OP_SIN:
r1 = ps_pop_real(st);
- ps_push_real(st, sinf(r1/RADIAN));
+ ps_push_real(st, sinf(r1/FZ_RADIAN));
break;
case PS_OP_SQRT: