diff --git a/src/core/Num.pm b/src/core/Num.pm index 2b903bfe957..24584d57a18 100644 --- a/src/core/Num.pm +++ b/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); } } diff --git a/src/core/Real.pm b/src/core/Real.pm index b6907e6d25d..3ac3c421b8e 100644 --- a/src/core/Real.pm +++ b/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); } }