P
P
pvgdrk2014-03-06 10:42:17
Geometry
pvgdrk, 2014-03-06 10:42:17

Is there a universal formula for determining the angle of a line from two points?

This is not a formula for determining the angle of a straight line from two points:
A = atan(y2-y1/x2-x1)
This is a formula for determining the angle of a straight line in the particular case when the angle of the straight line slopes to the right, and the straight line is only in positive coordinates t .e. at the top right of the coordinate space.
Is there a universal formula for determining the angle of a line from two points?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
[
[email protected]><e, 2014-03-06
@pvgdrk

Yes, atan2 :-)
From the definition it is clear that this is a function of two arguments, i.e. one point, and it returns the angle between the x-axis and the radius vector of the desired point. Accordingly, to obtain the angle of inclination of the segment, the center of the coordinate system should be moved to one of the points.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question