Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NumberRange

A subclass of TypeRange for numbers. It has helper functions for applying an offset to the range.

Hierarchy

Implements

Index

Constructors

constructor

Properties

bounds

bounds: RangeBounds

The inclusivity bounds to use

Readonly cf

A compare function that is used to compare two T

Optional max

max: number

The maximum value

Optional min

min: number

The minimum value

Accessors

def_max

  • get def_max(): boolean

def_min

  • get def_min(): boolean

undef_max

  • get undef_max(): boolean

undef_min

  • get undef_min(): boolean

Methods

bound_def

bound_undef

compareEndpoints

contains

  • contains(t: number): boolean

doesContainInRange

  • doesContainInRange(r: TypeRange<number>): boolean

getRangeSection

mayContainInRange

  • mayContainInRange(r: TypeRange<number>): boolean

pop_offset

  • pop_offset(o: number): void
  • Add a negative offset to the range

    Parameters

    • o: number

      The offset to apply

    Returns void

push_offset

  • push_offset(o: number): void
  • Add a positive offset to the range

    Parameters

    • o: number

      The offset to apply

    Returns void

toString

  • toString(): string

Static all

Static gt

Static gteq

Static lt

Static lteq

Generated using TypeDoc