Closed heitaoflower closed 5 years ago
Hi, I just wondering if you can add a feature of clamp, both of clampi and clampf
something like that,
? (value < min ? min : value > max ? max : value) \ : (value < max ? max : value > min ? min : value) \ )
mfloat_t clampf(float value, float min, float max); int clampf(int value, int min, int max);
I am will vrey glad to see u do that.
Will send a patch soon.
Hi, I just wondering if you can add a feature of clamp, both of clampi and clampf
something like that,
define CLAMP(value, min, max) (min < max \
? (value < min ? min : value > max ? max : value) \ : (value < max ? max : value > min ? min : value) \ )
mfloat_t clampf(float value, float min, float max); int clampf(int value, int min, int max);
I am will vrey glad to see u do that.