Permalink
Browse files

Tweak Real.atan2 and Num.atan2 so they can handle $x's which are not …

…of the ideal type.
  • Loading branch information...
1 parent 8978801 commit e58b166d508acea739c863e944f05a2d3030bfc8 @colomon colomon committed Jul 9, 2010
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/core/Num.pm
  2. +2 −2 src/core/Real.pm
View
4 src/core/Num.pm
@@ -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);
}
}
View
4 src/core/Real.pm
@@ -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);
}
}

0 comments on commit e58b166

Please sign in to comment.