Skip to main content

atan2

Function atan2 

pub fn atan2(y: f64, x: f64) -> f64
Expand description

Returns the arc tangent of y/x in radians. Use to get the angle of tangent y/x. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant.

Important note: The Y coordinate comes first, by convention.

var a = atan2(0, -1) # a is 3.141593