Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Number

Hierarchy

  • Number

Index

Methods

toExponential

  • toExponential(fractionDigits?: undefined | number): string
  • Returns a string containing a number represented in exponential notation.

    Parameters

    • Optional fractionDigits: undefined | number

      Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.

    Returns string

toFixed

  • toFixed(fractionDigits?: undefined | number): string
  • Returns a string representing a number in fixed-point notation.

    Parameters

    • Optional fractionDigits: undefined | number

      Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.

    Returns string

toLocaleString

  • Converts a number to a string by using the current or specified locale.

    Parameters

    • Optional locales: string | string[]

      A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.

    • Optional options: NumberFormatOptions

      An object that contains one or more properties that specify comparison options.

    Returns string

toPrecision

  • toPrecision(precision?: undefined | number): string
  • Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.

    Parameters

    • Optional precision: undefined | number

      Number of significant digits. Must be in the range 1 - 21, inclusive.

    Returns string

toString

  • toString(radix?: undefined | number): string
  • Returns a string representation of an object.

    Parameters

    • Optional radix: undefined | number

      Specifies a radix for converting numeric values to strings. This value is only used for numbers.

    Returns string

valueOf

  • valueOf(): number
  • Returns the primitive value of the specified object.

    Returns number