javascript angle equation of a line

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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
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;