mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Use Format.number in compareNumbers test helper with same precision as before.
This commit is contained in:
parent
4719c05403
commit
1732c2cbb2
1 changed files with 1 additions and 5 deletions
|
@ -50,11 +50,7 @@ function test(testName, expected) {
|
|||
}
|
||||
|
||||
function compareNumbers(number1, number2, message) {
|
||||
if (number1 !== 0)
|
||||
number1 = Math.round(number1 * 100) / 100;
|
||||
if (number2 !== 0)
|
||||
number2 = Math.round(number2 * 100) / 100;
|
||||
equals(number1, number2, message);
|
||||
equals(Format.number(number1, 2), Format.number(number2, 2), message);
|
||||
}
|
||||
|
||||
function comparePoints(point1, point2, message) {
|
||||
|
|
Loading…
Reference in a new issue