Unit circle coordinates to pi

102 Views Asked by At

If there are two coordinates of a unit circle, e.g. $x=0$, $ y=1$, I know this is $\frac{\pi}{2}$.

How can I calculate pi for any two coordinates, even if they are not places on the unit circle, like $x=1.23$, $y=-0.1$?

2

There are 2 best solutions below

2
On BEST ANSWER

If I am understanding correctly, you can take the $\text{atan2}(\frac{y}{x})$ in radians. Where the atan2 function is defined in this link:

atan2 link look under the heading Definition and computation.

So if you have the numbers you have above:

$\text{atan2}(\frac{-0.1}{1.23}) = -0.081 \text{ radians}$

to get the number of pi radians, we can divide by $\pi$

$-.081= \pi x$

this implies that:

$x = -.0258$

So you want the number $-.0258\pi$

2
On

"How can I calculate pi..." - I assume you mean "how can I compute the angle..." In general, if $(x,y)\neq(0,0)$, the angle from the positive $x$ axis to $(x,y)$ is given by the four-quadrant arctangent function. – Bungo 1 min ago