Skip to content

Commit

Permalink
bugfix in translators
Browse files Browse the repository at this point in the history
  • Loading branch information
dnorman committed Aug 25, 2012
1 parent 868dfe1 commit a59b15f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/DBR/Config/Trans/Dollars.pm
Expand Up @@ -52,9 +52,9 @@ use overload
new ($_[2] ? $b - $a : $a - $b);
},

'*' => sub { new($_[0]->cents * $_[1]) },
'*' => sub { new($_[0]->cents * sprintf("%f",$_[1]) ) },
'/' => sub {
my ($a,$b) = ($_[0]->cents, $_[1] );
my ($a,$b) = ($_[0]->cents, sprintf("%f",$_[1]) );
new ($_[2] ? $b / $a : $a / $b);
},

Expand Down
4 changes: 2 additions & 2 deletions lib/DBR/Config/Trans/Percent.pm
Expand Up @@ -51,9 +51,9 @@ use overload
'eq' => sub { $_[0]->value == (0 + $_[1]) },
'ne' => sub { $_[0]->value != (0 + $_[1]) },

'*' => sub { new($_[0]->value * $_[1]) },
'*' => sub { new($_[0]->value * sprintf("%f",$_[1]) ) },
'/' => sub {
my ($a,$b) = ($_[0]->value, $_[1] );
my ($a,$b) = ($_[0]->value, sprintf("%f",$_[1]) );
new ($_[2] ? $b / $a : $a / $b);
},

Expand Down

0 comments on commit a59b15f

Please sign in to comment.