What is the best way to round a number with 1 decimal left?

For example, I get this number when I subtract numberValue -0.1 and I have some really big number:
image
If we print it with math.round(), it is 2, with math.floor(), it is 1. Is it possible to make it just 1.5 instead of 1?
image

1 Like

best thing you could prob do without all the string.format stuff is to multiply the number by 10, floor or round it then divide it by 10.

2 Likes

Multiply the number by 10, round it, then divide by 10.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.