I need ur help for floating :)

Blitz3D Forums/Blitz3D Beginners Area/I need ur help for floating :)

Kissme(Posted 2004) [#1]
Hi all,

Am looking for an little rutime, but i have float like :
89.8899887 and i wan to have only 89.88

If someone have an function for kick the extra...

Many thanks
Stephanie


Bot Builder(Posted 2004) [#2]
hmm. How's this:

Print floater#(89.8899887,2)

Function floater#(Flot#,num)
 num=10^num
 Return Float(Floor(Flot#*num))/num
End Function



Kissme(Posted 2004) [#3]
Woot many thanks BOT !

Kiss ya
Stephanie