Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add Int.round with arguments to fix RT#118545
  • Loading branch information
labster committed Jun 23, 2013
1 parent 51f4ebe commit 077875a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/Int.pm
Expand Up @@ -63,8 +63,10 @@ my class Int does Real {
}

method floor(Int:D:) { self }
method round(Int:D:) { self }
method ceiling(Int:D:) { self }
proto method round(|) {*}
multi method round(Int:D:) { self }
multi method round(Int:D: $scale) { (self / $scale + 1/2).floor * $scale }

method lsb(Int:D:) {
return Nil if self == 0;
Expand Down

0 comments on commit 077875a

Please sign in to comment.