Skip to content

Commit

Permalink
Refactor into more intuitive range analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
sculpt0r committed Dec 11, 2020
1 parent 216dc93 commit d17b51b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/tools/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@
// @param {Number} max The maximum value in the range
// @returns {Boolean}
function isValueWithinRange( value, min, max ) {
return !( isNaN( value ) || value < min || value > max );
return !isNaN( value ) && value >= min && value <= max;
}

// Convert given value as hexadecimal based.
Expand Down

0 comments on commit d17b51b

Please sign in to comment.