|
PER Firmware
|
Utility header to clamp a value to a bounded range. More...
Go to the source code of this file.
Macros | |
| #define | DEFINE_CLAMP(type, name) |
| #define | CLAMP(input, lower_bound, upper_bound) |
Utility header to clamp a value to a bounded range.
Typesafe, supporting ints and floats. Integer promotions also cover int8_t, uint8_t, int16_t, uint16_t
| #define CLAMP | ( | input, | |
| lower_bound, | |||
| upper_bound ) |
| #define DEFINE_CLAMP | ( | type, | |
| name ) |