I am creating a control in .NET which computes polar coordinates based on $(x,y)$- coordinates within a panel control. Here is an image to use as a reference:

When the mouse moves over the circle, the mouse position is used to compute the polar coordinates based on the North and center point references.

To get the polar coordinates of point $(x_1, y_1)$ in example A, I use the Law of Cosines to find the angle:
$$ c^2 = a^2 + b^2 - 2ab \cos(c)$$
And the Pythagorean theorem to get the distance between the 3 points. For example with the Center point: $$ \sqrt{CenterX - x_1)^2 + (CenterY - y_1)^2}$$
Since I am moving clockwise around the circle and I want the degrees range to be $0 - 360$, once the mouse coordinate moves into the left hemisphere of the circle, the degrees begin to decrease back to $0$. To compensate for this, I use this:
if (x1 < NorthX)
degrees = 360 - degrees;
This works well as long as the plane from North through the Center point is parallel to $X$ axis. But what if the North point is defined as in Example B? And I'm trying to find if $(x_2, y_2)$ is in the "back half" of the circle?
I am looking for the more complex algorithm / formula that will tell if the mouse location has crossed the plane from North through the Center regardless of where the North point is.
Thanks in advance!
Solved! Thanks to @SrinivasK for the suggestion of using the
[Math.Atan2][1]function. I realized that I could use it to get the tangent angle of North then compare that against the tangent angle of the mouse point to see if it was within the first 180 degrees. Here is the C# code I used, which should be simple enough to use as general psuedo-code: