1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-27 15:50:09 +02:00

Fix rounding error in RectangleTest

This commit is contained in:
Oliver Vogel
2023-09-29 15:50:21 +02:00
parent 4f51d8f098
commit 166d2f3f92

View File

@@ -50,13 +50,13 @@ class RectangleTest extends TestCase
public function testGetAspectRatio()
{
$size = new Rectangle(800, 600);
$this->assertEquals(1.33333333333, $size->getAspectRatio());
$this->assertEquals(1.333, round($size->getAspectRatio(), 3));
$size = new Rectangle(100, 100);
$this->assertEquals(1, $size->getAspectRatio());
$size = new Rectangle(1920, 1080);
$this->assertEquals(1.777777777778, $size->getAspectRatio());
$this->assertEquals(1.778, round($size->getAspectRatio(), 3));
}
public function testFitsInto()