Use Format.number in compareNumbers test helper with same precision as before.

This commit is contained in:
Jonathan Puckey 2013-03-17 15:46:42 +01:00
parent 4719c05403
commit 1732c2cbb2

View file

@ -50,11 +50,7 @@ function test(testName, expected) {
} }
function compareNumbers(number1, number2, message) { function compareNumbers(number1, number2, message) {
if (number1 !== 0) equals(Format.number(number1, 2), Format.number(number2, 2), message);
number1 = Math.round(number1 * 100) / 100;
if (number2 !== 0)
number2 = Math.round(number2 * 100) / 100;
equals(number1, number2, message);
} }
function comparePoints(point1, point2, message) { function comparePoints(point1, point2, message) {