javascript angle equation of a line

Solutions on MaxInterview for javascript angle equation of a line by the best coders in the world

showing results for - "javascript angle equation of a line"
Alonso
09 Oct 2020
1// point 1 (x1, y1) or origine of vertex
2// point 2 (x2, y2)
3var dx = x2 - x1
4var dy = y2 - y1
5var ang = Math.atan2(dy, dx) * 180 / Math.PI;