We are about to switch to a new forum software. Until then we have removed the registration on this forum.
So I saw this example on constrain()
float mx = constrain(mouseX, 30, 70);
rect(mx-10, 40, 20, 20);
And I was trying to use it in my program that has WASD movement, but the experiment was unsuccessful. I was wandering how I would use it to stop my Ball when it hits the edge of the screen. Thank you!