Permalink
Browse files

fix infix:</>(Int, Rat)

  • Loading branch information...
moritz committed Sep 1, 2009
1 parent 4b9cd2d commit 0d6c42bcf0cc5ab01fa439fbfffa021b8360bcef
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/setting/Rat.pm
View
@@ -27,7 +27,7 @@ class Rat {
multi method perl() { "$!numerator/$!denominator"; }
multi method Str() { "$!numerator/$!denominator"; }
multi method Str() { $.Num.Str }
multi method Num() { $!numerator.Num / $!denominator.Num }
}
@@ -79,7 +79,7 @@ multi sub infix:</>(Rat $a, Int $b) {
}
multi sub infix:</>(Int $a, Rat $b) {
Rat.new($b.denominator, $a * $b.numerator);
Rat.new($b.denominator * $a, $b.numerator);
}
multi sub infix:</>(Int $a, Int $b) {

0 comments on commit 0d6c42b

Please sign in to comment.