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:
@@ -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()));
|
||||
|
@@ -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));
|
||||
|
Reference in New Issue
Block a user