Android Question always 3 places after the comma

Alexander Stolte

Expert
Licensed User
Longtime User
Hey,

i have a counter i count every 100ms + 0.011 and every time the result have 2 00 then the result ist for example 1.1 instead of 1.100, how can i avoid this?

B4X:
Do While isdown = True
        doublecounter = doublecounter + 0.011
        lbl_counter.Text =  Round2(doublecounter,3)
        
    Sleep(100)
    Loop
 

DonManfred

Expert
Licensed User
Longtime User
1.1 is the correct value.
Use numberformat to format a number

Or b4xformatter
 
Upvote 0
Top