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?
 

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
Cookies are required to use this site. You must accept them to continue using the site. Learn more…