Summary: | atan operator gives wrong result range | ||
---|---|---|---|
Product: | [Unmaintained] kpdf | Reporter: | Martin von Gagern <Martin.vGagern> |
Component: | general | Assignee: | Albert Astals Cid <aacid> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 0.5.7 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Test case |
Description
Martin von Gagern
2008-02-09 11:32:13 UTC
Created attachment 23496 [details]
Test case
This test case does something like a conical gradient using a shading based on
a Type 4 function. Originally the result of atan was divided by 90, but this
yields almost black on kpdf. By changing the denominator to 5, the gradient is
recognizable, while still being not too thin in the correct rendering of e.g.
acroread. The rendering of kpdf and acroread can therefore be compared easily.
SVN commit 772669 by aacid: atan operator must yield a degrees result between 0 and 360 BUG: 157497 M +4 -2 Function.cc WebSVN link: http://websvn.kde.org/?view=rev&revision=772669 That was fast! Looking at the code in svn, however, it looks like sin and cos were dealing in radians as well, so they should be modified as well in order to accept an argument given in degrees, as the PostScript reference states. 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 WebSVN link: http://websvn.kde.org/?view=rev&revision=772693 |