gb.collide.pointRect

Description

bool gb.collide.pointRect( int16_t pointX , int16_t pointY , uint16_t rectX , uint16_t rectY , uint16_t rectW , uint16_t rectH )

gb.collide.pointRect checks if a point collides with a rectangle, that is if the point is inside the rectangle.

Parameters

  • int16_t pointX: x-position of the point
  • int16_t pointY: y-position of the point
  • uint16_t rectX: x-position of the rectangle
  • uint16_t rectY: y-position of the rectangle
  • uint16_t rectW: width of the rectangle
  • uint16_t rectH: height of the rectangle

Returns

bool - true if the point and the rectangle collide, otherwise false

Example

N/A