Loading...
Logo
Processing Forum
How's that println(-5/12); doesn't work? It should give me -0.42, but instead it gives me just 0.
Is not possible to divide the negative number in Processing?

Replies(2)

Hello

the negative number isn't the problem. You can try:
println(-5.0/12.0);

-5 and 12 are integers, so -0.42 is 0
-5.0 and 12.0 are float

Cool that works :) Thanks.