1. ## need conversion solution

degrees = 270;
angle = degrees * (Math.PI / 180);
cos = Math.cos(angle);

How can I convert back to angle??

2. Originally Posted by questforknowledge004
degrees = 270;
angle = degrees * (Math.PI / 180);
cos = Math.cos(angle);

How can I convert back to angle??
are you talking about going from $270^{ \circ}$ back to radians? and you can just write pi, instead of Math.PI. and what is the distinction you are making between cos and Math.cos?

3. This is a snippet of code from a Macromedia Flash program.

The last line:
cos = Math.cos(angle);

returns the cos of angle (angle in radians). How do I convert back to angle from the value cos??

4. Originally Posted by questforknowledge004
This is a snippet of code from a Macromedia Flash program.

The last line:
cos = Math.cos(angle);

returns the cos of angle (angle in radians). How do I convert back to angle from the value cos??
you take the cosine inverse or the arccosine.

in general:

If $\cos x = y$

then $x = \cos^{-1} y = \arccos y$

is this what you want?

maybe you should tell me the specific problem, what are you calculating and what form do you want the answer in?

5. I will try to explain. Please forgive misuse of terms. I am working on a drawing program using Macromedia Flash. I believe the Flash uses Cartesian turning clockwise. I am working with x,y coordinates on a unit circle. x1, y1 (center point) and x2, y2 (outer point) are known values. How do I calculate the radians or degrees for the angle created by these two points??

for example:
x1 = 100
y1 = 100
x2 = 300
y2 = 300

Angle is 45 degrees.

x1 = 100
y1 = 100
x2 = 100
y2 = 0

Angle is 270 degrees.

I just don't know how to calculate the value mathmatically. Result in radians or degrees should work for me.

Thanks

6. Originally Posted by questforknowledge004
I will try to explain. Please forgive misuse of terms. I am working on a drawing program using Macromedia Flash. I believe the Flash uses Cartesian turning clockwise. I am working with x,y coordinates on a unit circle. x1, y1 (center point) and x2, y2 (outer point) are known values. How do I calculate the radians or degrees for the angle created by these two points??

for example:
x1 = 100
y1 = 100
x2 = 300
y2 = 300

Angle is 45 degrees.

x1 = 100
y1 = 100
x2 = 100
y2 = 0

Angle is 270 degrees.

I just don't know how to calculate the value mathmatically. Result in radians or degrees should work for me.

Thanks
First preform a parallel coordinate transfort.
$x \mapsto x-100$
$y\mapsto y-100$
So that the circle is at the center.
Now if a circle is at the center with radius $r>0$ and $(x,y)$ is a point on this circle then:
$x=r\cos \theta \mbox{ and }y=r\sin \theta$
Where $\theta$ is the angle created conterclockwise. (That is what positive direction is).

7. I don't understand the parallel transform.

8. Originally Posted by questforknowledge004
I don't understand the parallel transform.
Say you have a circle centered at $(2,1)$ then its equation is:
$(x-2)^2+(y-1)^2 = r^2$
Parallel transform means you replace $x-2$ by $x$ (which just means you move everything to the left 2 units) and $y-1$ by $y$ (which just means you move everything to the left 1 unit). That gives $x^2+y^2=r^2$. The reason is that this is a much easier circle to deal with and since the transform was parallel the angle measurements stay the same. Basically all you are doing is relabeling the origin of the coordinate axes to be at the center of the circle.