Wow thankyou so much! Thats exactly what I was trying to do. After phi_lho had suggested using atan2 I've vbeen trying to use it all morning with no luck, but this code is great.
Only problem is, the reason I was using rotate is because this is a preliminary sketch for something else... Im going to be 'placing' a wave form from a sound track between two constantly moving points, which is why I wanted the rotation and the angle because (as far as I know) thats the only way to manipulate a wave form... you cant set x and y positions for that.
I'll try and glimpse what I can out of your code, its still a step in the right direction.