Hierarchy

Implements

Constructors

  • Returns default

  • Parameters

    • xy: number | IVector2 | [number, number]

    Returns default

  • Parameters

    • x: number
    • y: number

    Returns default

Properties

DIRECTIONS: Readonly<Record<Direction, default>> = ...

Accessors

  • get x(): number
  • Returns number

  • set x(value: number): void
  • Parameters

    • value: number

    Returns void

  • get xy(): [number, number]
  • Returns [number, number]

  • set xy(values: [number, number]): void
  • Parameters

    • values: [number, number]

    Returns void

  • get y(): number
  • Returns number

  • set y(value: number): void
  • Parameters

    • value: number

    Returns void

  • get INFINITY(): default
  • Returns default

  • get INFINITY_NEGATIVE(): default
  • Returns default

  • get ONE(): default
  • Returns default

  • get ZERO(): default
  • Returns default

Methods

  • Parameters

    Returns default

  • Parameters

    • amount: number

    Returns default

  • Parameters

    • x: number
    • y: number

    Returns default

  • Parameters

    • index: number

    Returns number

  • Returns default

  • Type Parameters

    Parameters

    • dest: D

    Returns D

  • Parameters

    Returns default

  • Parameters

    • amount: number

    Returns default

  • Parameters

    • x: number
    • y: number

    Returns default

  • Parameters

    Returns boolean

  • Returns number

  • Parameters

    Returns default

  • Parameters

    • n: number

    Returns default

  • Parameters

    Returns default

  • Parameters

    • amount: number

    Returns default

  • Parameters

    • x: number
    • y: number

    Returns default

  • Returns default

  • Type Parameters

    Parameters

    • dest: D

    Returns D

  • Returns default

  • Type Parameters

    Parameters

    • dest: D

    Returns D

  • Returns IVector2

  • Returns void

  • Parameters

    • value: number

    Returns default

  • Type Parameters

    Parameters

    • value: number
    • dest: D

    Returns D

  • Returns number

  • Parameters

    Returns default

  • Parameters

    • amount: number

    Returns default

  • Parameters

    • x: number
    • y: number

    Returns default

  • Returns number

  • Returns string

  • Parameters

    • directionInRadians: number
    • distance: number = 1

    Returns default

  • The greater of the distances from points A and B on each axis.

    This distance formula covers a square pattern on a grid.

    Parameters

    Returns number

  • The measure of a straight line between points A and B.

    This distance formula covers a circular pattern on a grid.

    Parameters

    Returns number

  • Parameters

    Returns number

  • Parameters

    • center: IVector2
    • range: number
    • consumer: ConsumerVectorRange

    Returns void

  • Parameters

    • center: IVector2
    • range: number
    • includeCenter: boolean
    • consumer: ConsumerVectorRange

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • clientXClientY: {
          clientX?: number;
          clientY?: number;
      }
      • Optional clientX?: number
      • Optional clientY?: number

    Returns default

  • Parameters

    • Optional clientXClientY: {
          clientX?: number;
          clientY?: number;
      }
      • Optional clientX?: number
      • Optional clientY?: number

    Returns undefined | default

  • Parameters

    • size: {
          height: number;
          width: number;
      }
      • height: number
      • width: number

    Returns default

  • Parameters

    • Optional size: {
          height: number;
          width: number;
      }
      • height: number
      • width: number

    Returns undefined | default

  • Parameters

    • topLeft: {
          left: number;
          top: number;
      }
      • left: number
      • top: number

    Returns default

  • Parameters

    • Optional topLeft: {
          left: number;
          top: number;
      }
      • left: number
      • top: number

    Returns undefined | default

  • Parameters

    • center: IVector2
    • range: number
    • includeCenter: boolean = false

    Returns Generator<IVector2, any, unknown>

  • Parameters

    • thing: unknown

    Returns thing is IVector2

  • Parameters

    Returns boolean

  • The number of adjacent grid cell movements needed to get from A to B.

    This distance formula covers a diamond pattern on a grid.

    Parameters

    Returns number

  • Parameters

    Returns Generator<number[], void, unknown>

  • The euclidean distance (Vector2.distance), but without a sqrt operation afterwards, usually used for performance.

    Parameters

    Returns number

  • Parameters

    Returns [x: number, y: number]

Generated using TypeDoc