Mathamatical Query

Blitz3D Forums/Blitz3D Beginners Area/Mathamatical Query

Hi,

I'm using Blitz3D 1.83.

My code looks like this

scle#=.78
scle#=1024/800
Stop

when I debug, scle is equal to 0.0???

Please can somebody tell me why?
My brain hurts :-(

1024/800 is integer division (which turns out to be 1, then when assigned to a float var is 1.0)

what you want to do is this:
scle#=1024.0/800.0

...which is float division. Have fun. =)

I never thought about that?

Works fine.
Thanks heaps !!

My brain gives a big sigh of relief :-)