Angle between two lines with same origin?
I need to calculate angle between two line segments with the same origin. One 开发者_开发问答line is perpendicular to the y-axis. Please suggest a method?
Let's say you have two lines. y=m1x+c1
and y=m2x+c1
, lets say l1
and l2
respectively. If line l1
is perpendicular to the y
axis, it means that l1
is parallel to x
axis, so the slope of l1
is 0. So the angle between l1
and l2
will be arctan(m2)
.
精彩评论