📜  两点的javascript角度 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:03:30.333000             🧑  作者: Mango

代码示例1
// 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;