mirror of
https://github.com/Intervention/image.git
synced 2025-08-28 08:09:54 +02:00
Fix rounding error in RectangleTest
This commit is contained in:
@@ -50,13 +50,13 @@ class RectangleTest extends TestCase
|
|||||||
public function testGetAspectRatio()
|
public function testGetAspectRatio()
|
||||||
{
|
{
|
||||||
$size = new Rectangle(800, 600);
|
$size = new Rectangle(800, 600);
|
||||||
$this->assertEquals(1.33333333333, $size->getAspectRatio());
|
$this->assertEquals(1.333, round($size->getAspectRatio(), 3));
|
||||||
|
|
||||||
$size = new Rectangle(100, 100);
|
$size = new Rectangle(100, 100);
|
||||||
$this->assertEquals(1, $size->getAspectRatio());
|
$this->assertEquals(1, $size->getAspectRatio());
|
||||||
|
|
||||||
$size = new Rectangle(1920, 1080);
|
$size = new Rectangle(1920, 1080);
|
||||||
$this->assertEquals(1.777777777778, $size->getAspectRatio());
|
$this->assertEquals(1.778, round($size->getAspectRatio(), 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFitsInto()
|
public function testFitsInto()
|
||||||
|
Reference in New Issue
Block a user