Round number

Post your questions and help other users.

Moderator: Martin

Post Reply
akapelis
Posts: 41
Joined: 13 Jul 2016 20:51

Round number

Post by akapelis » 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.
Attachments
Screenshot_20190528_222224_ch.gridvision.ppam.androidautomagic.jpg
Screenshot_20190528_222224_ch.gridvision.ppam.androidautomagic.jpg (264.45 KiB) Viewed 11814 times

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Round number

Post by anuraag » 28 May 2019 23:54

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

Code: Select all

tmr= 500/180.

akapelis
Posts: 41
Joined: 13 Jul 2016 20:51

Re: Round number

Post by akapelis » 29 May 2019 05:14

Thank you very much.

Pepy
Posts: 76
Joined: 31 Oct 2018 10:53
Location: Canada

Re: Round number

Post by Pepy » 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).
Hope my post was helpful :D
Device: OnePlus 5T running crDroid, rooted with Magisk 8-)

akapelis
Posts: 41
Joined: 13 Jul 2016 20:51

Re: Round number

Post by akapelis » 31 May 2019 18:30

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.

Post Reply