Flint Engine
Modular C++20 2D game engine powered by SDL3
Loading...
Searching...
No Matches

◆ findIntersection()

template<typename T >
std::optional< Rect< T > > Flint::Rect< T >::findIntersection ( const Rect< T > & other) const
inline

Compute the intersection with another rectangle.

Parameters
otherRectangle to intersect with.
Returns
The overlapping region, or std::nullopt if the rectangles do not overlap.

Definition at line 125 of file types.h.