Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript angle equation of a line

// point 1 (x1, y1) or origine of vertex
// point 2 (x2, y2)
var dx = x2 - x1
var dy = y2 - y1
var ang = Math.atan2(dy, dx) * 180 / Math.PI;
 
PREVIOUS NEXT
Tagged: #javascript #angle #equation #line
ADD COMMENT
Topic
Name
7+7 =