Skip to content

Commit

Permalink
Rational.floor/ceiling less anal about return vals
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Jan 13, 2015
1 parent 0506869 commit 9672c0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Rational.pm
Expand Up @@ -39,14 +39,14 @@ my role Rational[::NuT, ::DeT] does Real {
));
}

method floor(Rational:D:) returns Int:D {
method floor(Rational:D:) {
# correct formula
$!denominator == 1
?? $!numerator
!! $!numerator div $!denominator
}

method ceiling(Rational:D:) returns Int:D {
method ceiling(Rational:D:) {
# correct formula
$!denominator == 1
?? $!numerator
Expand Down

0 comments on commit 9672c0d

Please sign in to comment.