Skip to content

Commit bc4c899

Browse files
committed
ci: Sprite::rotate: use 360 - deg instead of negative deg
1 parent 5ccbc70 commit bc4c899

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v2
1919

20-
- name: Remove system libgd & PHP
21-
run: sudo apt-get remove -y libgd3 'php*'
22-
2320
- name: Install PHP
2421
uses: shivammathur/setup-php@v2
2522
with:

src/Sprite/Sprite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public function rotate(int $rotation): self
161161
assert($gd !== false);
162162

163163
// GD rotates counter-clockwise, so negate the rotation
164-
$gd = imagerotate($gd, -$rotation * 90, 0);
164+
$gd = imagerotate($gd, 360 - $rotation * 90, 0);
165165
assert($gd !== false);
166166

167167
// 180deg rotation: only change offsets, no need to rescale

0 commit comments

Comments
 (0)