blob: f0613c910e923f974f9d965b84909dab678ba0c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#ifndef RUNE_UTIL_H
#define RUNE_UTIL_H
#include <stdint.h>
static inline uint32_t clamp(uint32_t value, float min, float max) {
const uint32_t ret = value < min ? min : value;
return ret > max ? max : ret;
}
#endif
|