I think those modulo operators might be unnecessary....
Moved the 'make-stuff happen' comment down so it just labels the driver code
Shape now changes direction on collision, even when this makes no intuitive sense.
Added better edge-bouncing code that now changes rotation direction. There is still a bug if the X and Y values of the center and impacting point ever are equivalent though. I need to handle that case instead of letting the rotation speed get stuck at 0.