Skip to main content

blockly > utils > Rect > contains

utils.Rect.contains() method

Tests whether this rectangle contains a x/y coordinate.

Signature:

contains(x: number, y: number): boolean;

Parameters

Parameter

Type

Description

x

number

The x coordinate to test for containment.

y

number

The y coordinate to test for containment.

Returns:

boolean

Whether this rectangle contains given coordinate.