1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-29 16:50:07 +02:00

Merge pull request #1041 from oscc-es/rotation-with-decimals

Allow rotation angle with decimals
This commit is contained in:
Oliver Vogel
2021-07-05 18:20:09 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ class RotateCommand extends AbstractCommand
$color = new Color($color);
// restrict rotations beyond 360 degrees, since the end result is the same
$angle %= 360;
$angle = fmod($angle, 360);
// rotate image
$image->setCore(imagerotate($image->getCore(), $angle, $color->getInt()));

View File

@@ -20,7 +20,7 @@ class RotateCommand extends AbstractCommand
$color = new Color($color);
// restrict rotations beyond 360 degrees, since the end result is the same
$angle %= 360;
$angle = fmod($angle, 360);
// rotate image
$image->getCore()->rotateImage($color->getPixel(), ($angle * -1));