Hey!
I got a problem in Processing. i want to define a variable to be 1/60. But if I look in the Console it always says, that the variable is 0. Last time I tried this (about one year ago) it worked perfectly. How do i fix this?
Hello,
Can you reproduce this?
You are doing integer math:
Integer Division -- from Wolfram MathWorld
Try 1.0/60 and see what happens.
Make sure that you declare your variables correctly as well.
References:
int / Reference / Processing.org
float / Reference / Processing.org
:)
3 Likes
Thank you very much. It worked, but last time i tried this i didn´t had to write 1.0