This site requires JavaScript, please enable it in your browser!
Greenfoot back
Nooooob
Nooooob wrote ...

2017/2/12

Numbers smaller than 1

Nooooob Nooooob

2017/2/12

#
Can you use numbers smaller than 1? Example:
if(isTouching(a.class))
       {
           length = length + //0.1 , 1/2 , 0,1 nothing working
       }
danpost danpost

2017/2/12

#
Nooooob wrote...
Can you use numbers smaller than 1?
Not unless the field ('length', in your case) is of type double or float (not int), or your unit of measure for 'length' is changed (instead of units, you assigned -- virtually --, say, 1/100th of a unit as the new unit).
You need to login to post a reply.