real numbers, and division.

Blitz3D Forums/Blitz3D Beginners Area/real numbers, and division.

Wrath_of_Zeus(Posted 2003) [#1]
For some reason, this:
myRealNumber# = 3/6
Text 0, 0, myRealNumber

gives the answer as 0.0

myRealNumber# = 0.5
Text 0, 0, myRealNumber

gives the answer as 0.5.

Am I missing something?


Wrath_of_Zeus(Posted 2003) [#2]
Seems as though the problem is that BB doesn't convert my two numbers to be divided into real numbers. This works:

myRealNumber# = 3.0/6.0


Ross C(Posted 2003) [#3]
yeah, think blitz will only use float if you tell it too. Well in my experience anyways :)


(tu) sinu(Posted 2003) [#4]
yeah you got to remember to write floats with a decimal ie 3.0 or they will give out integer values.