Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface RationalType

Hierarchy

  • RationalReturn
    • RationalType

Index

Properties

mpq_t: number = 0
type: string = 'rational'

Methods

  • add<T>(val: T): OutputType<T>
  • Returns the sum of this number and the given one.

    Type parameters

    • T: AllTypes

    Parameters

    • val: T

    Returns OutputType<T>

  • div<T>(val: T): OutputType<T>
  • Returns the result of the division of this number by the given one.

    Type parameters

    • T: AllTypes

    Parameters

    • val: T

    Returns OutputType<T>

  • greaterOrEqual(val: AllTypes): boolean
  • Returns true if the current number is greater than or equal to the provided number

    Parameters

    • val: AllTypes

    Returns boolean

  • greaterThan(val: AllTypes): boolean
  • Returns true if the current number is greater than the provided number

    Parameters

    • val: AllTypes

    Returns boolean

  • isEqual(val: AllTypes): boolean
  • Returns true if the current number is equal to the provided number

    Parameters

    • val: AllTypes

    Returns boolean

  • lessOrEqual(val: AllTypes): boolean
  • Returns true if the current number is less than or equal to the provided number

    Parameters

    • val: AllTypes

    Returns boolean

  • lessThan(val: AllTypes): boolean
  • Returns true if the current number is less than the provided number

    Parameters

    • val: AllTypes

    Returns boolean

  • mul<T>(val: T): OutputType<T>
  • Returns the product of this number and the given one.

    Type parameters

    • T: AllTypes

    Parameters

    • val: T

    Returns OutputType<T>

  • sign(): 0 | 1 | -1
  • Returns the sign of the current value (-1 or 0 or 1)

    Returns 0 | 1 | -1

  • sub<T>(val: T): OutputType<T>
  • Returns the difference of this number and the given one.

    Type parameters

    • T: AllTypes

    Parameters

    • val: T

    Returns OutputType<T>

  • Converts the number to a floating-point number

    Returns FloatType

  • toNumber(): number
  • Converts current value to a JavaScript number

    Returns number

  • toString(radix?: number): string
  • Converts the number to string

    Parameters

    • radix: number = 10

    Returns string

Generated using TypeDoc