How many axes are in your 2D project?
You've been insisting that this is 2D, and you even mentioned X and Y. Now I'm seeing Z.
Also, velocity is a change in position with respect to time. Unless you have timed the updates of redrawing, your "myVelocity" may be scaled badly (hence zooming off of the screen).
Your formula should give you an angle between 0 and 90 degrees. Is that what you are expecting (Quadrant I)? I haven't dabbled in VB for a while, but a popular function handles all quadrants. I'm assuming it's available in VB (atan2, atn2, ArcTangent2)? You would have to check the signs to determine the correct quadrant if you don't have an atan2 function.
The ArcTangent of what is 180?
Zaei
The ArcTangent of what is 180?
The values I get for atan(x) are
-90 < atan(x) < 90
and I don't think the sign from the atan function helps you much for which quadrant you are facing, so it's like getting an answer from 0 to something less than 90 (degrees). If you write code that tests the sign of your rise variable over your run variable, then you will know which quadrant you are in. Also, there is an atan2 function in most languages that will also tell you which quadrant you are in (i.e. will be "facing into").
If you are in quadrant I or IV then you will be "facing to the right", when you are in quadrant II or III, then you may need a mirror image of the object to "face to the left". For instance, a side-view image may need the mirror image; but a top down view would not need a mirror image. Both views will need a rotation.
Quadrants are:
II | I
____|____
|
III | IV
2 1
3 4