From t-o-f

P5js: À l'intérieur d'un rectangle

Contents (hide)

  1. 1. Algorithme
  2. 2. Exemple(s)

1.  Algorithme

Un point est à l'intérieur d'un rectangle si :

if ( xPoint > xCoin && xPoint < xCoin + largeur && yPoint > yCoin &&  yPoint < yCoin + hauteur ) {

}

p77 de Make: Getting Started with p5.js 
if ( mouseX > x && mouseX < x + w && mouseY > y &&  mouseY < y + h ) {

}

2.  Exemple(s)

Récupéré sur http://wiki.t-o-f.info/P5js/%c3%80Lint%c3%a9rieurDunRectangle
Page mise à jour le 09 March 2018 à 10h53