Hey all,
I'm working on an "increase CC" script. It gets the actual CC value and multiplies it with 1.050.
The result is of course a floating point value, therefore I have to use math.floor(ccValue*1.050) to convert
It to integer.
However, when triggering the script multiple times there are also values over 127 and this causes issues.
For the moment I'm using a solution like:
Code:
newCCValue = math.floor(ccValue*1.050)
If newCCValue > 127 then
newCCValue = 127
Is there a more elegant way to set a threshold, without an if condition?