# determing x,y increase by angle?

If I had a position of 0,0 and I had an angle of 45 degrees (or any number) and my velocity was 1 what would be the x,y increase?

For example if I had a 90 degree angle, and I had a velocity of 1. Then because my angle is straight up, my increase would be 1y and 0x.

Not sure if this makes sense, I am programming a small game, that shoots on any angle, and I need to pass it x and y coordinates so it shoots on the same angle.

Thanks!

Just need the equation, or a tutorial

-

From $(0,0)$ at angle $\theta$ at velocity $1$ you get to $x=\cos\theta$, $y=\sin\theta$. You know trigonometry?

-
used to! so if I had an angle of 45 it would just be x=cos45 and y=sin45 seems pretty straight forward. So x=0.707 and y = 1 – Johnny Quest Jun 27 '11 at 12:52
@Johnny, yes. – Gerry Myerson Jun 27 '11 at 12:55
@Johnny - $x$ looks fine by $y$ does not, as you should find $\cos 45 = \sin 45 = 1/\sqrt{2} \approx 0.707$ – Henry Jun 27 '11 at 13:05
oops, you are right, I did tan. is Y always going to be sin? If so why is that? – Johnny Quest Jun 27 '11 at 13:10
It is the definition of the sine as opposite/hypotenuse. Since your angle is measured from the $X$ axis, $v_x=v \cos(\theta), v_y=v \sin (\theta)$ – Ross Millikan Jun 27 '11 at 13:13