ludic/docs/language/collision/collision-rects.md
Orkuncakilkaya 2f19c8d8e2 refactor(stdlib): de-abbreviate namespaces (Mem/Sys/Net/Collide)
Expand the abbreviated public namespaces to full words, part of the
language-wide de-abbreviation pass:
  Mem -> Memory, Sys -> System, Net -> Network, Collide -> Collision

Math stays (universally accepted, like int/bool). Renames the dispatch
strings, LSP signatures, docs (dirs, files, frontmatter), and the
inventory manifest; behavior is byte-identical (the bare rt_ targets are
unchanged). Reseeded; C-free bootstrap fixpoint holds; all suites green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-30 01:30:47 +03:00

641 B

id name category kind tokens sig tip order ns member
collision-rects Collision.rects collision namespace-method Collision.rects Collision.rects(ax, ay, aw, ah, bx, by, bw, bh) -> bool Do two rectangles overlap? 0 Collision rects

Returns true when the axis-aligned rectangles (ax, ay, aw, ah) and (bx, by, bw, bh) overlap. Edges that merely touch do not count as overlapping. This is the standard broad-phase test for two hitboxes, tiles, or UI regions.

program Demo {
  handler Step phase Update {
    if Collision.rects(px, py, 16, 16, ex, ey, 16, 16) { hit() }
  }
}