1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-30 09:10:21 +02:00

Allow rotation angle with decimals

This commit is contained in:
Óscar García
2020-09-04 10:46:51 +02:00
parent 9355b63bcf
commit a79916a009
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));