MCPcopy Create free account
hub / github.com/comaps/comaps / Center

Method Center

libs/geometry/rect2d.hpp:157–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155 }
156
157 Point<T> Center() const { return Point<T>((m_minX + m_maxX) / 2.0, (m_minY + m_maxY) / 2.0); }
158 T SizeX() const { return std::max(static_cast<T>(0), m_maxX - m_minX); }
159 T SizeY() const { return std::max(static_cast<T>(0), m_maxY - m_minY); }
160 T Area() const { return SizeX() * SizeY(); }

Callers 15

FindCenterFunction · 0.45
MatchMethod · 0.45
ShowNodeMethod · 0.45
ClipTriangleByRectFunction · 0.45
SetGtoPMatrixMethod · 0.45
IsPanningAndRotateFunction · 0.45
UNIT_TESTFunction · 0.45
is_equal_centerFunction · 0.45
UNIT_TESTFunction · 0.45
GetMethod · 0.45

Calls

no outgoing calls

Tested by 5

UNIT_TESTFunction · 0.36
UNIT_TESTFunction · 0.36
UNIT_TESTFunction · 0.36
CheckNavigatorFunction · 0.36
UNIT_TESTFunction · 0.36