testIntersectsPoint2D static method

bool testIntersectsPoint2D(
  1. Box box,
  2. Position point
)

Returns true if box intesects with point in 2D.

Implementation

static bool testIntersectsPoint2D(Box box, Position point) {
  return !(box.minX > point.x ||
      box.maxX < point.x ||
      box.minY > point.y ||
      box.maxY < point.y);
}