We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b094c8 commit ec34176Copy full SHA for ec34176
1 file changed
test/unit/color/hsb.js
@@ -15,14 +15,12 @@
15
16
import HSBSpace from '../../../src/color/color_spaces/hsb.js';
17
18
-// Helper function to compare arrays with tolerance
19
-const arrayApproximately = (arr1, arr2, delta = 0.01) => {
20
- if (arr1.length !== arr2.length) return false;
21
- for (let i = 0; i < arr1.length; i++) {
22
- if (Math.abs(arr1[i] - arr2[i]) > delta) return false;
+assert.arrayApproximately = function (arr1, arr2, delta, desc) {
+ assert.equal(arr1.length, arr2.length);
+ for (var i = 0; i < arr1.length; i++) {
+ assert.approximately(arr1[i], arr2[i], delta, desc);
23
}
24
- return true;
25
-};
+}
26
27
suite('color/HSB Color Space', function() {
28
const accuracy = 0.01;
0 commit comments