Skip to content

Commit

Permalink
#136 add more round to make correct fractional part
Browse files Browse the repository at this point in the history
  • Loading branch information
wapmorgan committed Aug 6, 2023
1 parent 712a918 commit d401c6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Russian/MoneySpeller.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static function spell(
$integer = (int)floor($value);
$fractional = fmod($value, $integer);
$fractional = round($fractional, 2);
$fractional = (int)($fractional * 100);
$fractional = (int)round($fractional * 100);

switch ($format) {
case static::SHORT_FORMAT:
Expand Down

0 comments on commit d401c6c

Please sign in to comment.