diff --git a/src/Decimal.php b/src/Decimal.php index 2a374ae..e48380f 100644 --- a/src/Decimal.php +++ b/src/Decimal.php @@ -90,7 +90,7 @@ public static function fromFloat(float $fltValue, int $scale = null): Decimal throw new NaNInputError("fltValue can't be NaN"); } - $strValue = (string) $fltValue; + $strValue = str_replace(',', '.', (string) $fltValue); $hasPoint = (false !== \strpos($strValue, '.')); if (\preg_match(self::EXP_NUM_GROUPS_NUMBER_REGEXP, $strValue, $capture)) {