angleBetweenY(x1, y1, x2, y2) → {number}
Find the angle of a segment from (x1, y1) -> (x2, y2). The difference between this method and Math.angleBetween is that this assumes the y coordinate travelsdown the screen.
Parameters
Name Type Description x1 number The x coordinate of the first value. y1 number The y coordinate of the first value. x2 number The x coordinate of the second value. y2 number The y coordinate of the second value.
Returns
number - The angle, in radians.