What is wrong with this code?
I have this in code for a little balley thing that is supposed to bounce the other direction but instead it just does this weird thing were it is on one side then transports to the other side then transports back continually
if(getX() < 2) xSpeed = (xSpeed + xSpeed * 2);