rocinantealpha

reference / collision

inside

Whether a point is inside a shape or on its edge: inside mouse paddle.

box = { pos: { 100, 75 }, size: { 200, 150 } }draw [  background 240  if inside mouse box [ fill gold ] else [ fill 200 ]  rect at box.pos size box.size]
what it draws: the whole window, 400 by 300
What the example of inside draws

How to write it

inside point shape

Gives true or false.

Related