qc.Math.angleBetween

Prototype

  • number angleBetween(x1, y1, x2, y2)

Paramters

Paramter Type Description
x1 number
y1 number
x2 number
y2 number
return number The angle, in radians.

Description

Find the angle of a segment from (x1, y1) -> (x2, y2).

Example

    // return 2.0344439357957027
    var ret = game.math.angleBetween(1, 2, 0, 4);