public static function relativePercent($normal, $current): string
    {
        $normal = (float)$normal;
        $current = (float)$current;

        if (!$normal || $normal === $current) {
            return '100';
        }

        $normal = abs($normal);
        $percent = round($current / $normal * 100);

        return number_format($percent, 0, '.', ' ');
    }
public static function relativePercent($normal, $current): string
    {
        $normal = (float)$normal;
        $current = (float)$current;

        if (!$normal || $normal === $current) {
            return '100';
        }

        $normal = abs($normal);
        $percent = round($current / $normal * 100);

        return number_format($percent, 0, '.', ' ');
    }
public static function relativePercent ( $ normal , $ current ) : string { $ normal = ( float ) $ normal ; $ current = ( float ) $ current ; if ( ! $ normal || $ normal === $ current ) { return '100' ; } $ normal = abs ( $ normal ) ; $ percent = round ( $ current / $ normal * 100 ) ; return number_format ( $ percent , 0 , '.' , ' ' ) ; }
Get relative percent

@param float|int $normal
@param float|int $current
@return string
Get relative percent