Skip to content

Commit

Permalink
Tweak Real.atan2 and Num.atan2 so they can handle $x's which are not …
Browse files Browse the repository at this point in the history
…of the ideal type.
  • Loading branch information
colomon committed Jul 9, 2010
1 parent 8978801 commit e58b166
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/core/Num.pm
Expand Up @@ -171,8 +171,8 @@ augment class Num does Real {
(1 / $x).atanh($base);
}

method atan2(Num $y: Num $x = 1, $base = Radians) {
pir::atan__NNn($y, $x).from-radians($base);
method atan2(Num $y: $x = 1, $base = Radians) {
pir::atan__NNn($y, $x.Numeric.Num).from-radians($base);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/core/Real.pm
Expand Up @@ -192,8 +192,8 @@ role Real does Numeric {
$x.Bridge.acotanh($base);
}

method atan2(Real $y: Real $x = 1, $base = Radians) {
$y.Bridge.atan2($x.Bridge, $base);
method atan2(Real $y: $x = 1, $base = Radians) {
$y.Bridge.atan2($x, $base);
}
}

Expand Down

0 comments on commit e58b166

Please sign in to comment.