blockly > utils > Rect > contient

Méthode utils.Rect.contains()

Détermine si ce rectangle contient une coordonnée x/y.

Signature :

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

Paramètres

Paramètre Type Description
x Nombre Coordonnée X pour tester le confinement.
y Nombre Coordonnée Y pour tester le confinement.

Renvoie :

booléen

Indique si ce rectangle contient une coordonnée donnée.