How do i round up a decimal to a whole number

how do i round up a decimal to a whole number because sometimes my texlabel sometimes says like 1.9999999 or something like that and i dont know how to fix that.

1 Like

You can use the math.floor() function to round the number to the nearest whole number.

To round the decimal to the nearest whole number, use math.round()

To specifically round the decimal up (as in, to the nearest integer equal to or greater than the given decimal), use math.ceil()

To specifically round the decimal down (as in, to the nearest integer equal to or lesser than the given decimal), use math.floor()

4 Likes