how to limit number range in c code example
Example: c limit value range
#define ConstrainVal(val,min,max) ( (val > max) ? (max) : ( (val < min) ? (min) : (val) ) )
#define ConstrainVal(val,min,max) ( (val > max) ? (max) : ( (val < min) ? (min) : (val) ) )