Function rect_contains_or_intersects

  • Check if a given rect contains or intersects with a given point.

    Parameters

    • rect: Rectangle

      the rectangle to be checked.

    • x: number

      the x point cord to be checked.

    • y: number

      the y point cord to be checked.

    Returns boolean

    returns true if the given rect contains or intersects with the given point.