- #1
nancy189
- 8
- 0
Hi Guys,
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
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