I notice that I HAVE copied incorrectly. My apologies, the last part of the function is supposed to be reversed. (Angle_out = theAngle)

Also; I understand everything you just said (Mostly because I knew about adding vectors already). But not your code at all. And none of it gives me any clue as to how it helps, and how it is used to calculate collisions.