Zen API
|
T kAdjustCeil | ( | const T & | value, |
const T & | min, | ||
const T & | max, | ||
const T & | granularity | ||
) |
Rounds the specified input up, conforming to minimum, maximum, and granularity constraints.
Granularity represents the step size (quantum) between valid output values. It is interpreted as relative to the specified min value. E.g., with min=3, max=7, and granularity=2, output values would be constrained to {3, 5, 7}.
This method requires C++ 2011; accordingly, it cannot be used in inline functions that may be processed by C compilers or older C++ compilers.
value | Input value. |
min | Minimum value. |
max | Maximum value. |
granularity | Granularity (must be positive). |