Skip to content

Commit 8303744

Browse files
authored
Merge pull request #51 from SunflowerFuchs/develop
Fix pointsToEmu calculation
2 parents 97b9bef + 7d9c7a8 commit 8303744

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Common/Drawing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ public static function pointsToEmu(float $pValue = 0): int
259259
return 0;
260260
}
261261

262-
return (int) round(($pValue / 0.75) / 9525);
262+
return (int) round(($pValue / 0.75) * 9525);
263263
}
264264

265265
/**

tests/Common/Tests/DrawingTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function testPointsEmu(): void
7979
$value = rand(1, 100);
8080

8181
$this->assertEquals(0, Drawing::pointsToEmu());
82-
$this->assertEquals(round($value / 0.75 / 9525), Drawing::pointsToEmu($value));
82+
$this->assertEquals(round($value / 0.75 * 9525), Drawing::pointsToEmu($value));
8383
}
8484

8585
public function testCentimetersPoints(): void

0 commit comments

Comments
 (0)