Update colors-almost-equal threshold

This commit is contained in:
adroitwhiz 2021-02-25 20:58:12 -05:00
parent e075e5f5eb
commit a930503793

View file

@ -13,7 +13,8 @@ Test.prototype.addAssert('colorsAlmostEqual', 2, function (found, wanted, messag
}
for (let i = 0; i < found.length; i++) {
if (Math.abs(found[i] - wanted[i]) > 1e-3) {
// smallest meaningful difference--detects changes in hue value after rounding
if (Math.abs(found[i] - wanted[i]) >= 0.5 / 360) {
return this.fail(message, extra);
}
}