✓ Accepted answer
There's no simple way to do this sadly but it is most definitely possible. First you need to move the decimal place. This can be done by multiplying it by 10, 100, 1000 but there is a more modular solution as well.
For all of the following replace Num with your unrounded variable, and replace # with how many decimal places you want to round by. (1 or 2 in your case)
Num * 10^(#)
Next you need to use math.floor to round down the number. One thing is that in most cases you will need to round up and down where math.floor only rounds down. To fix this simply add .5 to your number before rounding.
If you do want to only round down do not add the .5 and if you only want to only round up add 1 instead.
math.floor(Num * 10^(#) + 0.5)
Now you need to get it back to its original decimal place. To do this do the same as before and divide instead of multiplying
math.floor(Num * 10^(#) + 0.5) / 10^(#)
That should get you your rounded number.
1 comment
I just tested it, Thank you So Much!