Skip to content

Commit

Permalink
refactor condition
Browse files Browse the repository at this point in the history
  • Loading branch information
EricRovell authored and Vlad Shilov committed Sep 23, 2021
1 parent 13d82e3 commit 87da7d0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/get/getPerceivedDifference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,7 @@ export function getDeltaE00(color1: LabaColor, color2: LabaColor): number {
if (dhAbs <= 180) {
H /= 2;
} else {
if (h1 + h2 < 360) {
H = (H + 360) / 2;
} else {
H = (H - 360) / 2;
}
H = (h1 + h2 < 360 ? H + 360 : H - 360) / 2;
}

const T =
Expand Down

0 comments on commit 87da7d0

Please sign in to comment.