MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / sort

Method sort

source/camera/CullingManager.cpp:210–222  ·  view source on GitHub ↗

! \brief Sort two VectorInt64 p1 and p2 to satisfy p1 <= p2 according to * the value of X or Y coordinate, which depends on sortByX param. */

Source from the content-addressed store, hash-verified

208 * the value of X or Y coordinate, which depends on sortByX param.
209 */
210void CullingManager::sort(VectorInt64& p1, VectorInt64& p2, bool sortByX)
211{
212 if (sortByX)
213 {
214 if (p1.x > p2.x)
215 std::swap(p1, p2);
216 }
217 else
218 {
219 if (p1.y > p2.y)
220 std::swap(p1, p2);
221 }
222}
223
224

Callers 1

buildSlopesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected