Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add MMD candidate for Complex.round
  • Loading branch information
lizmat committed Oct 21, 2014
1 parent 3687508 commit 6797fde
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/Complex.pm
Expand Up @@ -196,7 +196,10 @@ my class Complex is Cool does Numeric {
}

proto method round(|) {*}
multi method round(Complex:D: $scale as Real = 1) {
multi method round(Complex:D:) {
Complex.new( self.re.round, self.im.round );
}
multi method round(Complex:D: $scale as Real) {
Complex.new( self.re.round($scale), self.im.round($scale) );
}

Expand Down

0 comments on commit 6797fde

Please sign in to comment.