| 215 | static inline int32_t clampi(int32_t value, int32_t low, int32_t high) { if (value < low) value = low; else if (value > high) value = high; return value; } |
| 216 | static inline float clampf(float value, float low, float high) { if (value < low) value = low; else if (value > high) value = high; return value; } |
| 217 | static inline float saturate(float value) { return clampf(value, 0, 1.0f); } |
| 218 | |
| 219 | static inline uint8_t mul_8(uint32_t v, uint32_t q) { v = v * q + 128; return (uint8_t)((v + (v >> 8)) >> 8); } |
| 220 |
no test coverage detected