[poppler] Branch 'poppler-0.6' - poppler/Function.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Sat Feb 9 04:37:16 PST 2008
poppler/Function.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit fa15cd94be09262b902aeac5b3d3533a8167e4f8
Author: Albert Astals Cid <aacid at kde.org>
Date: Sat Feb 9 13:37:04 2008 +0100
PS cos and sin input values are degrees so convert to radians so we can use the cos and sin cmath functions
diff --git a/poppler/Function.cc b/poppler/Function.cc
index 9a9951a..dfaf04c 100644
--- a/poppler/Function.cc
+++ b/poppler/Function.cc
@@ -1331,7 +1331,7 @@ void PostScriptFunction::exec(PSStack *stack, int codePtr) {
stack->copy(stack->popInt());
break;
case psOpCos:
- stack->pushReal(cos(stack->popNum()));
+ stack->pushReal(cos(stack->popNum() * M_PI / 180.0));
break;
case psOpCvi:
if (!stack->topIsInt()) {
@@ -1512,7 +1512,7 @@ void PostScriptFunction::exec(PSStack *stack, int codePtr) {
}
break;
case psOpSin:
- stack->pushReal(sin(stack->popNum()));
+ stack->pushReal(sin(stack->popNum() * M_PI / 180.0));
break;
case psOpSqrt:
stack->pushReal(sqrt(stack->popNum()));
More information about the poppler
mailing list