<?php

namespace Modules\Stock\Helper;

class NumberHelper
{
    public static function toFloat(string|float $value): float
    {
        if (is_float($value)) {
            return $value;
        }

        return floatval(str_replace(' ', '', $value));
    }
}
