type

Num

src abstract const class Num : Obj

Num is the base class for number classes: Int, Float, and Decimal.

methods

localeDecimal

Get the current locale's decimal separator.

localeGrouping

Get the current locale's separator for grouping thousands together.

localeMinus

Get the current locale's minus sign used to represent a negative number.

localeNaN

Get the current locale's string representation for not-a-number.

localeNegInf

Get the current locale's string representation for negative infinity.

localePercent

Get the current locale's symbol for the percent sign.

localePosInf

Get the current locale's string representation for positive infinity.

toDecimal

Convert this number to a Decimal.

toFloat

Convert this number to a Float.

toInt

Convert this number to an Int.

Slot Details

localeDecimal

src static Str localeDecimal()

Get the current locale's decimal separator. For example in the the US this is a dot.

localeGrouping

src static Str localeGrouping()

Get the current locale's separator for grouping thousands together. For example in the US this is a comma.

localeMinus

src static Str localeMinus()

Get the current locale's minus sign used to represent a negative number.

localeNaN

src static Str localeNaN()

Get the current locale's string representation for not-a-number.

localeNegInf

src static Str localeNegInf()

Get the current locale's string representation for negative infinity.

localePercent

src static Str localePercent()

Get the current locale's symbol for the percent sign.

localePosInf

src static Str localePosInf()

Get the current locale's string representation for positive infinity.

toDecimal

src Decimal toDecimal()

Convert this number to a Decimal.

toFloat

src Float toFloat()

Convert this number to a Float.

toInt

src Int toInt()

Convert this number to an Int.