Page 1 of 1
Round number
Posted: 28 May 2019 20:31
by akapelis
Why this simple script returns "2" Instead of "2.7777"?
I would like to obtain the rounded result of the operation (3) but I can't. Please help me.
Re: Round number
Posted: 28 May 2019 23:54
by anuraag
Desmanto wrote: ↑22 Jan 2019 18:01
Common division will always result in integer. You must have one of the number involved in division to have decimal.
So add decimal in one of number
So
Re: Round number
Posted: 29 May 2019 05:14
by akapelis
Thank you very much.
Re: Round number
Posted: 30 May 2019 09:41
by Pepy
akapelis wrote: ↑28 May 2019 20:31
Why this simple script returns "2" Instead of "2.7777"?
I would like to obtain the rounded result of the operation (3) but I can't. Please help me.
One of the numbers in the expression has to be a decimal, otherwise the result will be an integer (and any decimals in the result will be cut off).
Re: Round number
Posted: 31 May 2019 18:30
by akapelis
Pepy wrote: ↑30 May 2019 09:41
akapelis wrote: ↑28 May 2019 20:31
Why this simple script returns "2" Instead of "2.7777"?
I would like to obtain the rounded result of the operation (3) but I can't. Please help me.
One of the numbers in the expression has to be a decimal, otherwise the result will be an integer (and any decimals in the result will be cut off).
Thank you very much.