struct

Number

Inherits Steppable / Comparable / Value / Object

The top-level number type.

Constants

SIZE_PREFIXES = { {" Bytes", " KiloBytes", " MegaBytes", " GigaBytes", " TeraBytes", " PetaBytes", " ExaBytes", " ZettaBytes", " YottaBytes"}, {" Bytes", " KiloBytes", " MegaBytes", " GigaBytes", " TeraBytes", " PetaBytes", " ExaBytes", " ZettaBytes", " YottaBytes"} }

Class methods

si_prefix(magnitude : Int, prefixes = SI_PREFIXES) : Char | String | Nil

Returns the SI prefix for magnitude.

Number.si_prefix(3) # => 'k'
Source