Class: ScientificNotation
Defined in: utils/scientificNotation.ts:4
Utilities for formatting and parsing numbers in scientific notation.
Constructors
Constructor
new ScientificNotation():
ScientificNotation
Returns
ScientificNotation
Methods
fromScientific()
staticfromScientific(notation):number
Defined in: utils/scientificNotation.ts:33
Parses a scientific notation string back to a number.
Parameters
notation
string
The scientific notation string (e.g., "3.14e-5")
Returns
number
The parsed number, or NaN if invalid
roundScientific()
staticroundScientific(value,significantDigits):string
Defined in: utils/scientificNotation.ts:44
Rounds a number while preserving scientific notation.
Parameters
value
number
The number to round
significantDigits
number = 3
The number of significant digits
Returns
string
A rounded scientific notation string
toScientific()
statictoScientific(value,significantDigits):string
Defined in: utils/scientificNotation.ts:11
Converts a number to scientific notation with proper rounding.
Parameters
value
number
The number to format
significantDigits
number = 3
Number of significant digits
Returns
string
A string representation in scientific notation
