calculate angle in degrees between two points code example
Example: how to find angle between two points
let angle = Math.atan2( y2 - y1, x2 - x1 ) * ( 180 / Math.PI )
let angle = Math.atan2( y2 - y1, x2 - x1 ) * ( 180 / Math.PI )