[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdegraphics/kpdf/xpdf/xpdf
From:       Albert Astals Cid <tsdgeos () terra ! es>
Date:       2008-02-09 12:40:22
Message-ID: 1202560822.707014.22725.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 772693 by aacid:

PS cos and sin input values are degrees so convert to radians so we can use the cos \
                and sin cmath functions
CCBUG: 157497


 M  +2 -2      Function.cc  


--- branches/KDE/3.5/kdegraphics/kpdf/xpdf/xpdf/Function.cc #772692:772693
@@ -1330,7 +1330,7 @@
 	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()) {
@@ -1511,7 +1511,7 @@
 	}
 	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()));


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic