11 lines
No EOL
194 B
C++
11 lines
No EOL
194 B
C++
#include "utils.h"
|
|
|
|
uint8_t ui8_clamp(int value, uint8_t min, uint8_t max) {
|
|
if (value < min) {
|
|
return min;
|
|
}
|
|
if (value > max) {
|
|
return max;
|
|
}
|
|
return value;
|
|
} |