<?php
namespace Root\Core\Helper;

class NumberHelper
{
    public static function formatCurrency(float $amount, string $symbol = '₮'): string
    {
        return $symbol . number_format($amount, 2);
    }

    public static function humanReadable(int|float $number): string
    {
        if ($number >= 1_000_000) return round($number / 1_000_000, 1) . 'M';
        if ($number >= 1_000) return round($number / 1_000, 1) . 'K';
        return (string)$number;
    }
}
