From d401c6cade36c3c4702bcfd71936abf1c27902df Mon Sep 17 00:00:00 2001 From: wapmorgan Date: Sun, 6 Aug 2023 12:54:49 +0300 Subject: [PATCH] #136 add more round to make correct fractional part --- src/Russian/MoneySpeller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Russian/MoneySpeller.php b/src/Russian/MoneySpeller.php index 3ceba42..12aea45 100644 --- a/src/Russian/MoneySpeller.php +++ b/src/Russian/MoneySpeller.php @@ -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: