22 + return r.top_left.x >= top_left.x && 23 + r.top_left.x.as_int() + r.size.width.as_int() <= 24 + top_left.x.as_int() + size.width.as_int() && 25 + r.top_left.y >= top_left.y && 26 + r.top_left.y.as_int() + r.size.height.as_int() <= 27 + top_left.y.as_int() + size.height.as_int();
I do find this a bit hard to parse. I'd write something like:
auto const btmright = bottom_right(); auto const r_btmright = r.bottom_right();
return r.top_left.x >= top_left.x && r.top_left.y >= top_left.y && r_btmright.x <= btmright.x && r_btmright.y <= btmright.y;
« Back to merge proposal
22 + return r.top_left.x >= top_left.x && x.as_int( ) + r.size. width.as_ int() <= y.as_int( ) + r.size. height. as_int( ) <= as_int( );
23 + r.top_left.
24 + top_left.x.as_int() + size.width.as_int() &&
25 + r.top_left.y >= top_left.y &&
26 + r.top_left.
27 + top_left.y.as_int() + size.height.
I do find this a bit hard to parse. I'd write something like:
auto const btmright = bottom_right();
auto const r_btmright = r.bottom_right();
return r.top_left.x >= top_left.x && r.top_left.y >= top_left.y &&
r_btmright. x <= btmright.x && r_btmright.y <= btmright.y;