menu
Number
import { Number } from "destack:math";
Number constants and parsing functions.
1export class Number {2 EPSILON: float64;3 MAX_VALUE: float64;4 MIN_VALUE: float64;5 MAX_SAFE_INTEGER: float64;6 MIN_SAFE_INTEGER: float64;7 POSITIVE_INFINITY: float64;8 NEGATIVE_INFINITY: float64;9 NaN: float64;10 toString(radix?: float64 | undefined): Cow<"frame", string>;11 toFixed(fractionDigits?: float64 | undefined): Cow<"frame", string>;12 toExponential(fractionDigits?: float64 | undefined): Cow<"frame", string>;13 toPrecision(precision?: float64 | undefined): Cow<"frame", string>;14 toLocaleString(locales?: string | string[] | undefined, options?: NumberFormatOptions | undefined): Cow<"frame", string>;15 valueOf(): float64;16 static isFinite(value: unknown): boolean;17 static isInteger(value: unknown): boolean;18 static isNaN(value: unknown): boolean;19 static isSafeInteger(value: unknown): boolean;20 static parseFloat(text: string): float64;21 static parseInt(text: string, radix?: float64 | undefined): float64;22}Members
EPSILON: float64Difference between 1 and the next representable float64 value.
MAX_VALUE: float64The largest finite float64 value.
MIN_VALUE: float64The smallest positive float64 value.
MAX_SAFE_INTEGER: float64The largest exactly representable integer in a float64.
MIN_SAFE_INTEGER: float64The smallest exactly representable integer in a float64.
POSITIVE_INFINITY: float64Positive infinity.
NEGATIVE_INFINITY: float64Negative infinity.
NaN: float64Not-a-number.
toString(radix?: float64 | undefined): Cow<"frame", string>Return this number as a string.
toFixed(fractionDigits?: float64 | undefined): Cow<"frame", string>Return this number in fixed-point notation.
toExponential(fractionDigits?: float64 | undefined): Cow<"frame", string>Return this number in exponential notation.
toPrecision(precision?: float64 | undefined): Cow<"frame", string>Return this number with the requested precision.
toLocaleString(locales?: string | string[] | undefined, options?: NumberFormatOptions | undefined): Cow<"frame", string>Return this number as a locale-aware string.
valueOf(): float64Return the primitive number value.
static isFinite(value: unknown): booleanReturn whether
valueis finite.static isInteger(value: unknown): booleanReturn whether
valueis an integer.static isNaN(value: unknown): booleanReturn whether
valueis NaN.static isSafeInteger(value: unknown): booleanReturn whether
valueis exactly representable as an integer.static parseFloat(text: string): float64Parse a float64 from
text.static parseInt(text: string, radix?: float64 | undefined): float64Parse an integer from
text.