MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Shared

Method Shared

Source/Engine/Core/Math/Rectangle.cpp:86–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86Rectangle Rectangle::Shared(const Rectangle& a, const Rectangle& b)
87{
88 const float left = Math::Max(a.GetLeft(), b.GetLeft());
89 const float right = Math::Min(a.GetRight(), b.GetRight());
90 const float top = Math::Max(a.GetTop(), b.GetTop());
91 const float bottom = Math::Min(a.GetBottom(), b.GetBottom());
92 return Rectangle(left, top, Math::Max(right - left, 0.0f), Math::Max(bottom - top, 0.0f));
93}
94
95Rectangle Rectangle::FromPoints(const Float2& p1, const Float2& p2)
96{

Callers 2

DrawMethod · 0.45
DrawMethod · 0.45

Calls 5

GetLeftMethod · 0.80
GetRightMethod · 0.80
MaxFunction · 0.70
MinFunction · 0.70
RectangleClass · 0.70

Tested by

no test coverage detected