Skip to content

Instantly share code, notes, and snippets.

@rauluranga
Created January 26, 2011 17:38
Show Gist options
  • Save rauluranga/797077 to your computer and use it in GitHub Desktop.
Save rauluranga/797077 to your computer and use it in GitHub Desktop.
constraint a number between defined limits.
Math.max(MIN_LIMIT,Math.min(value_num,MAX_LIMIT));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment