mirror of
https://github.com/scratchfoundation/scratch-render.git
synced 2025-06-13 22:10:51 -04:00
Update colors-almost-equal threshold
This commit is contained in:
parent
e075e5f5eb
commit
a930503793
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue