how to keep fraction number ???

hello

i have problem with keep the fraction numbers…

for example …

var timeOne : float = 0.0;

timeOne = 100/250;

print(timeOne.ToString(“f5”));

will be print 0.00000

also when i used as float 0.00

but must be 0.40000

note : i don’t want to use the value as string but as float.

thx…

100 is integer value.
250 is integer value.

Division of two integer valuse gives INTEGER VALUE!
You wont get fractions naturally. Even though your variable is of type float, division is executed on integer values and then casted to float. But if you were to write:

timeOne = 100f/250f 

you WOULD get fraction result.