Hierarchy

Constructors

Properties

Methods

Constructors

  • The rectangle constructor, initializes position and size

    Parameters

    • x: number

      X coordinate of the position

    • y: number

      Y coordinate of the position

    • width: number

      Rectangle width

    • height: number

      Rectangle height

    Returns Rectangle

Properties

position: ICoordinates

Range position

The rectangle size

Methods

  • Check if the given point is inside the rectangle

    Returns

    true or false, checking if the given point is inside the rectangle

    Parameters

    Returns boolean

  • Check if another range intersects the rectangle

    Returns

    true or false, checking if the range is intersecting with the rectangle

    Parameters

    • range: Range

      the range to check

    Returns boolean