Fix pdfioContentMatrixRotate function.

This commit is contained in:
Michael R Sweet 2022-07-01 20:30:40 -04:00
parent acea6fdbed
commit 1a17933635
No known key found for this signature in database
GPG Key ID: 999559A027815955
2 changed files with 6 additions and 2 deletions

View File

@ -8,6 +8,7 @@ v1.1.0 (Month DD, YYYY)
- Added `pdfioFileCreateTemporary` function (Issue #29)
- Added `pdfioDictIterateKeys` function (Issue #31)
- Fixed "install-shared" target (Issue #32)
- Fixed `pdfioContentMatrixRotate` function.
v1.0.1 (March 2, 2022)

View File

@ -489,8 +489,11 @@ pdfioContentMatrixRotate(
pdfio_stream_t *st, // I - Stream
double degrees) // I - Rotation angle in degrees counter-clockwise
{
double dcos = cos(degrees / M_PI); // Cosine
double dsin = sin(degrees / M_PI); // Sine
double dcos = cos(M_PI * degrees / 180.0);
// Cosine
double dsin = sin(M_PI * degrees / 180.0);
// Sine
return (pdfioStreamPrintf(st, "%g %g %g %g 0 0 cm\n", dcos, -dsin, dsin, dcos));
}