method atan2

Documentation for method atan2 assembled from the following types:

class Cool

From Cool

(Cool) routine atan2

Defined as:

method atan2($y = 1e0)

Coerces self and argument to Numeric, using them to compute the two-argument arc-tangent in radians.

say 3.atan2;                # OUTPUT: «1.24904577239825␤» 
say ⅔.atan2(⅓);             # OUTPUT: «1.1071487177940904␤» 

The first argument defaults to 1, so in the first case the function will return the angle θ in radians between a vector that goes from origin to the point (3, 1) and the x axis.