Skip to main content

Reference / Modules / node-api / Numbers / ScientificNumber

Class: ScientificNumber

node-api.Numbers.ScientificNumber

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new ScientificNumber(coefficient, tenExponent): ScientificNumber

Parameters

NameType
coefficientstring | NormalizedNumber
tenExponentnumber

Returns

ScientificNumber

Defined in

numbers.ts:134

Properties

_normalized

Private Readonly _normalized: NormalizedNumber

Defined in

numbers.ts:131


_tenExponent

Private Readonly _tenExponent: number

Defined in

numbers.ts:132

Accessors

coefficient

get coefficient(): NormalizedNumber

Returns

NormalizedNumber

Defined in

numbers.ts:223


normalized

get normalized(): NormalizedNumber

Returns

NormalizedNumber

Defined in

numbers.ts:189


tenExponent

get tenExponent(): number

Returns

number

Defined in

numbers.ts:193

Methods

convertTo

convertTo(newTenExponent): ScientificNumber

Parameters

NameType
newTenExponentnumber

Returns

ScientificNumber

Defined in

numbers.ts:143


divideBy

divideBy(other): ScientificNumber

Parameters

NameType
otherScientificNumber

Returns

ScientificNumber

Defined in

numbers.ts:227


limitDecimalDigits

limitDecimalDigits(decimalPart, relevantDecimalPart): ScientificNumber

Parameters

NameType
decimalPartstring
relevantDecimalPartstring

Returns

ScientificNumber

Defined in

numbers.ts:218


limitIntegerDigits

limitIntegerDigits(integerPart, maxDigits): ScientificNumber

Parameters

NameType
integerPartstring
maxDigitsnumber

Returns

ScientificNumber

Defined in

numbers.ts:213


negate

negate(): ScientificNumber

Returns

ScientificNumber

Defined in

numbers.ts:244


optimizeScale

optimizeScale(maxDigits): ScientificNumber

Parameters

NameType
maxDigitsnumber

Returns

ScientificNumber

Defined in

numbers.ts:197


shiftDecimalSeparator

shiftDecimalSeparator(positions): string

Parameters

NameType
positionsnumber

Returns

string

Defined in

numbers.ts:148


toNumber

toNumber(): number

Returns

number

Defined in

numbers.ts:239