Function FRect.unify
Wraps SDL_UnionFRect which creates a dsdl (from SDL 2.0.22) of the minimum size to
enclose two given dsdls
Parameters
| Name | Description |
|---|---|
| other | other dsdl to unify with the dsdl |
Returns
dsdl of the minimum size to enclose the dsdl and other
Example
auto rect1 = dsdl .FRect(-2.0, -2.0, 3.0, 3.0);
auto rect2 = dsdl .FRect(-1.0, -1.0, 3.0, 3.0);
assert(rect1 .hasIntersection(rect2));
assert(rect1 .intersectRect(rect2) .get == dsdl .FRect(-1.0, -1.0, 2.0, 2.0));
}