U
U
Umid2017-05-10 09:44:29
JavaScript
Umid, 2017-05-10 09:44:29

Is it possible to find the angle between a line and the x-axis?

Greetings.
Interested in how you can find the angle between the segment and the X axis, if the coordinates of the segment are known.
Perhaps atan2 function in js?
If not, what is it for?
I read on MDN, I didn’t really understand what was happening.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alvvi, 2017-05-10
@DarCKoder

Strange you read, there is even a picture attached.
a0c030e3f5aa4d4e8d2e8a739c6dd5c8.png

Math.atan2(vector.y, vector.x) = угол между вектором и осью X

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question