Hi Guys,(adsbygoogle = window.adsbygoogle || []).push({});

I want to rotate a line so that it lies on the positive x direction. I can determine the equation of the line as y=m*x+c where m is the slope and c is the intercept. The angle of rotation, theta is known by tan inverse of m. Now theta can be either -theta or -(pi+theta) depending on the quadrant in which the line lies.

How can I know which of these thetas i should use directly by looking at the equation of the line. I need to rotate about 400 lines so manually looking at each line can be time intensive. I can use an if else loop in my code to do it automatically.

Thanks.

Nancy

**Physics Forums - The Fusion of Science and Community**

# Calculating angle of a rotation for a line

Know someone interested in this topic? Share a link to this question via email,
Google+,
Twitter, or
Facebook

Have something to add?

- Similar discussions for: Calculating angle of a rotation for a line

Loading...

**Physics Forums - The Fusion of Science and Community**