Skip to content

Commit

Permalink
Fixes text and examples
Browse files Browse the repository at this point in the history
I fact, it was more wrong than indicated for the OP. Thanks for
drawing our attention to this. Closes #2482
  • Loading branch information
JJ committed Nov 30, 2018
1 parent 1e74f97 commit 71179be
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions doc/Type/Cool.pod6
Expand Up @@ -272,16 +272,17 @@ radians.
Defined as:
sub atan2(Numeric() $x, Numeric() $y = 1e0)
method atan2($y = 1e0)
Coerces the arguments (including the invocant in the method form) to
L<Numeric|/type/Numeric>, and returns their two-argument
L<arc-tangent|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions> in
radians.
Coerces self and argument to L<Numeric|/type/Numeric>, using them to compute the
two-argument L<arc-tangent|https://en.wikipedia.org/wiki/Atan2> in radians.
say atan2(3); # OUTPUT: «1.24904577239825␤»
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.
=head2 routine sec
Expand Down

0 comments on commit 71179be

Please sign in to comment.