pointToRect static method

bool pointToRect(
  1. Vec2 p,
  2. AABB rect
)

Implementation

static bool pointToRect(Vec2 p, AABB rect) =>
    p.x >= rect.left && p.x <= rect.right && p.y >= rect.top && p.y <= rect.bottom;