# Where is zero degrees on a graph

I am using the following formula to calculate the position of a point after rotation in my web application.

x' = xcos(0) - ysin(0)
y' = xsin(0) + ycos(0)


But where on a graph is zero degrees in Mathematics? In the following image can you tell me where zero degrees is(is it at Point A or Point B?) If it turns out that zero degrees is at point B then I will need to add 90 degrees to all my degree values in order to use the above function, correct?

-
Usually it's at $B$. – Rasmus Mar 21 '12 at 10:41
@Rasmus thanks, so if it was B I would need to add 90(or is it minus) degrees to my angle to use that math function? Ie, because my program considers zero degrees from point A, if I use the formula I will be really working out a rotation for 135 degrees which will be incorrect wont it? – Jake M Mar 21 '12 at 10:46
In trigonometry the argument of every direct trigonometric function, cosine, sine, etc. is the angle measured counterclockwise from the positive x-axis. See this Wikipedia section. So it corresponds to B. – Américo Tavares Mar 21 '12 at 10:52
Is there a connection between this question and this other question posted a quarter of an hour earlier? It sure looks like it; even the $\theta$ written like a $0$ is the same. – joriki Mar 21 '12 at 10:56

The argument of the trigonometric functions in your formulas is not the absolute angle of a point but the relative angle by which the point $(x',y')$ is rotated with respect to the point $(x,y)$. Thus you don't need to know where the angle zero is in absolute terms; all you need to know is whether a positive angle represents a clockwise or a counterclockwise rotation. This you can find out e.g. by rotating the point $(1,0)$ by $\pi/2$ (or $90^\circ$); the result is $(0,1)$, so the rotation is counterclockwise.
If you do ever need to know where the angle $0$ is in absolute terms, it's usually taken to be along the positive $x$ axis, with positive angles between $0$ and $\pi/2$ representing points in the first quadrant, i.e. with positive $x$ and $y$ coordinates.
By the way, I disagree with your claim that "in programming, zero degrees is at point $A$". I think Java counts as programming, and it uses the mathematical convention, in which zero degrees corresponds to $B$; see e.g. the API for java.awt.Graphics.drawArc.