We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33422e0 commit d7f415aCopy full SHA for d7f415a
css-color-4/deltaE2000.js
@@ -100,8 +100,8 @@ function deltaE2000 (reference, sample) {
100
// Four possibilities for hue weighting factor,
101
// depending on the angles, to get the correct sign
102
let hdash;
103
- if (Cdash1 == 0 && Cdash2 == 0) {
104
- hdash = hsum; // which should be zero
+ if (Cdash1 * Cdash2 === 0) {
+ hdash = hsum;
105
}
106
else if (habs <= 180) {
107
hdash = hsum / 2;
0 commit comments