MCPcopy Create free account
hub / github.com/NetHack/NetHack / rect_bounds

Function rect_bounds

src/rect.c:133–140  ·  view source on GitHub ↗

Put the rectangle containing both r1 and r2 into r3 */

Source from the content-addressed store, hash-verified

131
132/* Put the rectangle containing both r1 and r2 into r3 */
133void
134rect_bounds(NhRect r1, NhRect r2, NhRect *r3)
135{
136 r3->lx = min(r1.lx, r2.lx);
137 r3->ly = min(r1.ly, r2.ly);
138 r3->hx = max(r1.hx, r2.hx);
139 r3->hy = max(r1.hy, r2.hy);
140}
141
142/*
143 * Remove a rectangle from the list of free NhRect.

Callers 4

l_selection_andFunction · 0.85
l_selection_orFunction · 0.85
l_selection_xorFunction · 0.85
l_selection_subFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected