Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Float64Type

Hierarchy

  • Float64Type

Implements

Index

Constructors

constructor

Properties

Private _options

allowInfinity

allowInfinity: boolean

allowNaN

allowNaN: boolean

name

name: Name = name

Methods

Private _applyOptions

  • _applyOptions(): void

clone

  • clone(value: number): number

diff

  • diff(oldVal: number, newVal: number): [number, number] | undefined
  • Parameters

    • oldVal: number
    • newVal: number

    Returns [number, number] | undefined

equals

  • equals(left: number, right: number): boolean
  • Tests the equivalence of two valid float64 values.

    Two values are equivalent if they are both NaN, both -0, both +0 or non-zero and numerically equal.

    Parameters

    • left: number
    • right: number

    Returns boolean

lte

  • lte(left: number, right: number): boolean
  • Compares two valid float64 values.

    The values are ordered as follow:

    • -Infinity
    • Negative non-zero finite values
    • -0
    • +0
    • Positive non-zero finite values
    • +Infinity
    • NaN

    Parameters

    • left: number

      Left operand.

    • right: number

      Right operand.

    Returns boolean

    Boolean indicating if left <= right

patch

  • patch(oldVal: number, diff: [number, number] | undefined): number
  • Parameters

    • oldVal: number
    • diff: [number, number] | undefined

    Returns number

read

  • read<R>(reader: Reader<R>, raw: R): number

reverseDiff

  • reverseDiff(diff: [number, number] | undefined): [number, number] | undefined
  • Parameters

    • diff: [number, number] | undefined

    Returns [number, number] | undefined

squash

  • squash(diff1: [number, number] | undefined, diff2: [number, number] | undefined): [number, number] | undefined
  • Parameters

    • diff1: [number, number] | undefined
    • diff2: [number, number] | undefined

    Returns [number, number] | undefined

test

  • test(val: number): boolean

testError

  • testError(val: number): Error | undefined

toJSON

write

  • write<W>(writer: Writer<W>, value: number): W

Static fromJSON

Generated using TypeDoc