Skip to content

Commit

Permalink
add infix mod
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Jul 4, 2011
1 parent d9d8c49 commit ce2882f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/Real.pm
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,8 @@ multi infix:«>=»(Real \$a, Real \$b) { $a.Bridge >= $b.Bridge }

multi infix:<cmp>(Real \$a, Real \$b) { $a.Bridge cmp $b.Bridge }

proto sub infix:<mod>(|$) {*}
multi sub infix:<mod>(Real $a, Real $b) {
$a - ($a div $b) * $b;
}

0 comments on commit ce2882f

Please sign in to comment.