This beginner here is strugling to solve some math problems:

Imagine a ball moving in a room. When the ball hits a wall, its movement vector is reflected with the same incident angle. (disconsider friction and loss of energy).

Now, in my game, I have an object where I know it's position (x,y) and it's direction angle (0 to 360). How to reproduce the above cited behavior?

I remember one of the first virus around for PC-XT's, the pingpong virus that do exactly what I'm describing.

Any hints?