TRational

A number type allowing for higher precision when used to represent a rational number with a specified denominator and additional fields indicating the change direction across different periods.

Extends

Constructor

  • constructor

    Represents a number that can be expressed in the form numerator / denominator, with additional fields indicating the change direction across different periods. Supports a fixed set of denominator values.
    • new TRational(numerator: number, denominatorType: DenominatorType, doubleValue: number, tick: Trend, trendOnDay: Trend, trendOnPrevious: Trend): TRational

      Represents a number that can be expressed in the form numerator / denominator, with additional fields indicating the change direction across different periods. Supports a fixed set of denominator values.

      Returns TRational

Methods

  • toString

    • toString(): string

      Format a string showing the value and trending information.

      Returns string

  • toJSON

    • toJSON(): any

      Returns any

  • fromJSON

  • trendingToString

    • trendingToString(): string

      Format a string showing trending information.

      Returns string

  • trendToString

    • trendToString(trend: Trend): string

      Utility to convert trend into a friendly single-character representation.

      Returns string

  • valueOf

    • valueOf(): number

      Returns the doubleValue.

      Returns number

Properties

Also in this Section

Functions

Interfaces