Created
November 20, 2020 12:44
-
-
Save renet/b388da0c866d1954fc8cf0b372e1fe94 to your computer and use it in GitHub Desktop.
Limit a number between a min and a max range
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Math.between = (value, min, max) => Math.max(Math.min(value, max), min); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment