iOS Question Round B4i Vs Round B4A

MarcoRome

Expert
Licensed User
Longtime User
Hi All.
I have this code:
B4X:
    Dim g_pro As Double
    g_pro = (1300 * (50/100)) / 4
    Log(g_pro)
    Log(Round(g_pro))

And i have this result in B4A ( 163 )
1702360470794.png


B4i ( 162 )
1702360509055.png


Any suggestion.
Thank you
 

MarcoRome

Expert
Licensed User
Longtime User
Hi All.
I have this code:
B4X:
    Dim g_pro As Double
    g_pro = (1300 * (50/100)) / 4
    Log(g_pro)
    Log(Round(g_pro))

And i have this result in B4A ( 163 )
View attachment 148599

B4i ( 162 )
View attachment 148600

Any suggestion.
Thank you

Found Solution:

B4X:
Sub RoundUpNumberFormat(d As Double, integers As Int, fractions As Int) As String
    Return NumberFormat(d + 0.0000001, integers, fractions)
End Sub
 
Last edited:
Upvote 0
Top