Reference / Modules / node-api / Numbers / ScientificNumber
Class: ScientificNumber
node-api.Numbers.ScientificNumber
Table of contents
Constructors
Properties
Accessors
Methods
- convertTo
- divideBy
- limitDecimalDigits
- limitIntegerDigits
- negate
- optimizeScale
- shiftDecimalSeparator
- toNumber
Constructors
constructor
• new ScientificNumber(coefficient
, tenExponent
): ScientificNumber
Parameters
Name | Type |
---|---|
coefficient | string | NormalizedNumber |
tenExponent | number |
Returns
Defined in
Properties
_normalized
• Private
Readonly
_normalized: NormalizedNumber
Defined in
_tenExponent
• Private
Readonly
_tenExponent: number
Defined in
Accessors
coefficient
• get
coefficient(): NormalizedNumber
Returns
Defined in
normalized
• get
normalized(): NormalizedNumber
Returns
Defined in
tenExponent
• get
tenExponent(): number
Returns
number
Defined in
Methods
convertTo
▸ convertTo(newTenExponent
): ScientificNumber
Parameters
Name | Type |
---|---|
newTenExponent | number |
Returns
Defined in
divideBy
▸ divideBy(other
): ScientificNumber
Parameters
Name | Type |
---|---|
other | ScientificNumber |
Returns
Defined in
limitDecimalDigits
▸ limitDecimalDigits(decimalPart
, relevantDecimalPart
): ScientificNumber
Parameters
Name | Type |
---|---|
decimalPart | string |
relevantDecimalPart | string |
Returns
Defined in
limitIntegerDigits
▸ limitIntegerDigits(integerPart
, maxDigits
): ScientificNumber
Parameters
Name | Type |
---|---|
integerPart | string |
maxDigits | number |
Returns
Defined in
negate
▸ negate(): ScientificNumber
Returns
Defined in
optimizeScale
▸ optimizeScale(maxDigits
): ScientificNumber
Parameters
Name | Type |
---|---|
maxDigits | number |
Returns
Defined in
shiftDecimalSeparator
▸ shiftDecimalSeparator(positions
): string
Parameters
Name | Type |
---|---|
positions | number |
Returns
string
Defined in
toNumber
▸ toNumber(): number
Returns
number