Page 1 of 1
dz.utils.round (4.0,0) is not 4
Posted: Sunday 24 May 2020 22:25
by renerene
dz.utils.round (4.0,0) is not 4 but 4.0
Is that correct? If so, what is an easy way to make 4 out of 4.0?
Re: dz.utils.round (4.0,0) is not 4
Posted: Sunday 24 May 2020 22:35
by waaren
renerene wrote: Sunday 24 May 2020 22:25
dz.utils.round (4.0,0) is not 4 but 4.0
Is that correct? If so, what is an easy way to make 4 out of 4.0?
Thx for reporting. need to look into that behavior but for now you can use math.floor(4.0)
or if 4.0 is a variable:
rawNumber = 4.0
math.floor(rawNumber + 0.5)
Re: dz.utils.round (4.0,0) is not 4
Posted: Monday 25 May 2020 7:33
by renerene
thank you