[Gambas-user] Best ways to format float values
Charlie
charlie at ...2793...
Thu Jul 13 17:12:39 CEST 2017
Also consider: -
Public Sub Main()
Dim fNum As Float[] = [26.6601666666666, 26.6651666666666] 'Note 26.660..
and 26.665..
Dim fTemp As Float
For Each fTemp In fNum
fTemp *= 100
fTemp += 0.5
fTemp = Int(fTemp)
fTemp /= 100
Print fTemp;;
Next
'Output 26.66 26.67
End
-----
Check out www.gambas.one
--
View this message in context: http://gambas.8142.n7.nabble.com/Best-ways-to-format-float-values-tp59733p59743.html
Sent from the gambas-user mailing list archive at Nabble.com.
More information about the User
mailing list