I was looking for a way to take floating point values with two decimal places such as the following and round them to the closest integer:
97.54 -> 98
122.00 -> 122
90.98 -> 91
144.19 -> 144
Ideally, something like
$round(%bpm%)
or
$trunc($add(%bpm%,0.5))
But I found that just doing the following truncates the value to an integer, without adding the floating point value.
$add(%bpm%,0.5)
and
$mul(%bpm%,100)
drops the decimal value before multiplying, so that something like 90.98 x 100 = 9000.
Integer only?
-> after dano has edited the topic this reference does not make sense any more, please ignore.