Created
May 3, 2015 22:05
-
-
Save yannxou/2e93dceff309c9153f19 to your computer and use it in GitHub Desktop.
Macro to easily bound a number within an upper/lower 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
#define BOUND(VALUE, UPPER, LOWER) MIN(MAX(VALUE, LOWER), UPPER) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment