My double variable adds itself 0.032/33 and 0.064/65
Hello there. I'm having such an strange problem with a double variable which increases 0.032 and 0.064 by itself.
Each time I click on a JButton, the variable has to increase in 0.01, starting on 0. The thing is that after some clicks, it increases itself 0.032 or 0.064. It's ever at the same number of clicks; for example, when the number is 0.499 it goes to 0.564. Ever the same clicks. Of course, there's nothing in the (long)code that says it to add that numbers. What's happening?
Another problem that I have is that the same variable usually adds 0.011, or 0.0101, even if I say to it to add 0.010000000000000. How can I solve it?