Skip to content

Commit

Permalink
Undeprecate is_approx in lieu of new API
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed May 20, 2015
1 parent 5b50254 commit fb28112
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/Test.pm
Expand Up @@ -216,11 +216,6 @@ multi sub cmp-ok(Mu $got, $op, Mu $expected, $desc = '') is export {
}

multi sub is_approx(Mu $got, Mu $expected, $desc = '') is export {
DEPRECATED('is-approx',|<2015.05 2015.09>);
is-approx($got, $expected, $desc);
}

multi sub is-approx(Mu $got, Mu $expected, $desc = '') is export {
$time_after = nqp::p6box_n(nqp::time_n);
my $tol = $expected.abs < 1e-6 ?? 1e-5 !! $expected.abs * 1e-6;
my $test = ($got - $expected).abs <= $tol;
Expand Down

0 comments on commit fb28112

Please sign in to comment.