How to limit visible decimal numbers?

how do i limit the visible this decimal number so it would only show

“15.70”
and not "15.700000000000001 "
(Shown in pic)

image

Using the *round() variable is your best bet. If you want to get into the decimals, you may also find it useful to extract characters from a string or number.

1 Like

More generically, you need to find the index of the decimal point and then get the substring from the first character to the decimal point index + 2 (or whatever).

This is a little tedious to do (given the lack of a substring function), but fortunately someone has already done the hard yards for you.

Have a look at the cslib library which contains both the index and substring functions. (just use the forum search for it - I can’t remember the exact link)