namespace adas_core.Domain.Utils;

public static class NumberUtils
{
    public static bool IsNumber(this object value)
    {
        return value is sbyte
               || value is byte
               || value is short
               || value is ushort
               || value is int
               || value is uint
               || value is long
               || value is ulong
               || value is float
               || value is double
               || value is decimal;
    }

    public static double ToDouble(this object value)
    {
        return Convert.ToDouble(value);
    }
}