Android Question Rounding of a number

red30

Well-Known Member
Licensed User
Longtime User
B4X:
Lable1.Text=Round2((127/64),0)
I get a text "1.0" in Lable1. How can I get only an integer part?
 

DonManfred

Expert
Licensed User
Longtime User
Or use Numberformat
Or use the Smart String Literal
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
Here are few other options depending on where you want to go with the number up or down:
B4X:
Log(Round(127/64)) 'displays 2
Log(Floor(127/64)) 'displays 1
Log(Ceil(127/64))  'displays 2
 
Upvote 0
Top