how to force float math

BlitzMax Forums/BlitzMax Beginners Area/how to force float math

CloseToPerfect(Posted 2010) [#1]
I know you have to force float math when you have a int and a float but I can't remember how to do this. can someone help.

local a:int
local b:float
a=10
b=a/20
notify b

in this example it notifies 0.00000000

thanks
CTP


_Skully(Posted 2010) [#2]
you could say b=a/20.0 or b=float(a)/20.0


CloseToPerfect(Posted 2010) [#3]
yes thank you.
that was so simple, but I could not remember how to do it.


ImaginaryHuman(Posted 2010) [#4]
or b=float(a)/20 should also give a float result I think