I am making a clone of flappy bird. But I can't get the right rotation yet! The rotation was so glitchy at first.
After some research i found that you can use Math.Atan2(y,x); to rotate between those to points!

//this is the code i am using
rotation = (float)Math.Atan2(position.Y, 1.5708);

the problem is, it is not rotating quite smoothly.

Any help would be appreciated!
thanks in advance!