| 136 | } |
| 137 | |
| 138 | void test_point_within(Rect<int> r, Vec2<int> p, bool expected) |
| 139 | { |
| 140 | if (r.within(p) != expected) |
| 141 | { |
| 142 | LogError("Point %s incorrectly %s rect %s", p, expected ? "not within" : "within", r); |
| 143 | exit(EXIT_FAILURE); |
| 144 | } |
| 145 | } |
| 146 | void test_rect_within(Rect<int> r1, Rect<int> r2, bool expected) |
| 147 | { |
| 148 | if (r1.within(r2) != expected) |