min-max limiter
Posted: Mon Apr 25, 2016 7:13 am
Hello,
i couldn't find a function in newlisp to limit a value between upper and lower limits.
i.e. something like this:
"return x < some_minimum ? some_minimum : x > some_maximum ? : some_maximum : x;"
Reason is that i'am working a lot with sin, cos and the brothers and i often need to limit my floats for example to precisly -1 or 1.
Thanks and Regards
Heiko
i couldn't find a function in newlisp to limit a value between upper and lower limits.
i.e. something like this:
"return x < some_minimum ? some_minimum : x > some_maximum ? : some_maximum : x;"
Reason is that i'am working a lot with sin, cos and the brothers and i often need to limit my floats for example to precisly -1 or 1.
Thanks and Regards
Heiko