Class Rect

A rectangle.

Hierarchy

  • Rect

Constructors

  • Parameters

    • xMin: number
    • xMax: number
    • yMin: number
    • yMax: number

    Returns Rect

Properties

xMax: number
xMin: number
yMax: number
yMin: number

Accessors

  • get bottom(): number
  • Returns number

  • get centerX(): number
  • Returns number

  • get centerY(): number
  • Returns number

  • get height(): number
  • Returns number

  • get left(): number
  • Returns number

  • get right(): number
  • Returns number

  • get top(): number
  • Returns number

  • get width(): number
  • Returns number

Methods

  • Parameters

    • other: Rect

      The other rect.

    • epsilon: number = 0.0001

      The comparison epsilon.

    Returns boolean

    True if they are equal.

  • Parameters

    Returns Rect

  • Parameters

    Returns Rect

  • Returns the equivalent rectangle of source normalized over the dimensions of dest.

    Parameters

    • source: Rect

      The source rect.

    • dest: Rect

      The destination rect.

    Returns {
        h: number;
        w: number;
        x: number;
        y: number;
    }

    • h: number
    • w: number
    • x: number
    • y: number

Generated using TypeDoc