Class Box

Represents a box in 2D space.

Constructors

Properties

Methods

Constructors

Properties

pos: Vector

The position of the box.

size: Vector

The size of the box.

Methods

  • Rounds down the position and size of the box to the nearest integer.

    Returns Box

    A new Box instance with the rounded position and size.

  • Checks if the box overlaps with another box.

    Parameters

    • pos: Vector

      The position of the other box.

    • size: Vector

      The size of the other box.

    Returns boolean

    True if the boxes overlap, false otherwise.