158c836e26
PDF 32000-1:2008 7.10.5.1 "Type 4 (PostScript Calculator) Functions" defers to the PostScript Language Reference for the description of these functions. The PostScript Language Reference, third edition chapter 8 "Operators" defines the `angle` type as a "number of degrees". Section 8.1 defines "angle `sin` real", "angle `cos` real", and "num den `atan` angle". The documentation for `atan` further states that it will return an angle in degrees between 0 and 360. Handle these operators correctly in `PostScriptEvaluator.execute`. Convert the inputs to `sin` and `cos` from degrees to radians for use with `Math.sin` and `Math.cos`. Correctly pop two values from the stack for `atan`, use `Math.atan2`, and convert from radians to (positive) degrees.
137 KiB
137 KiB