From e58b166d508acea739c863e944f05a2d3030bfc8 Mon Sep 17 00:00:00 2001 From: Solomon Foster Date: Fri, 9 Jul 2010 07:41:14 -0400 Subject: [PATCH] Tweak Real.atan2 and Num.atan2 so they can handle $x's which are not of the ideal type. --- src/core/Num.pm | 4 ++-- src/core/Real.pm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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); } }