A series of commonly used extended functions for numerical operations.
Members
-
(static, constant) SuperMap.Number.decimalSeparatorstring
-
The acquiescent separative sign of the decimal point when formatting numbers
- Default Value: '.'
(static, constant) SuperMap.Number.thousandsSeparatorstring
The acquiescent separative sign of the thousands when formatting numbers.
- Default Value: ','
Methods
-
SuperMap.Number.format(num, dec, tsep, dsep){string}
BaseTypes.js, line 295 -
Formatted output the number.
Name Type Default Description num
number number.
dec
integer 0 optional Rounding the decimal part of the number to the specified number of valid digits. The decimal part is fixed when the null value is set.
tsep
string ',' optional The thousands separator.
dsep
string '.' optional The decimal point Separator.
Returns:
Type Description string String after the NumberFormatter. -
SuperMap.Number.limitSigDigs(num, sig){number}
BaseTypes.js, line 280 -
Limit the valid digits of the floating point numbers.
Name Type Description num
number Floating point number.
sig
integer Effective number of digits.
Returns:
Type Description number Rounding the number to the specified number of valid digits.