MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / operator()

Method operator()

game/state/tilemap/tileobject.cpp:68–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66{
67 public:
68 bool operator()(const sp<TileObject> &lhs, const sp<TileObject> &rhs) const
69 {
70 float lhsZ = lhs->getCenter().x * lhs->map.velocityScale.x +
71 lhs->getCenter().y * lhs->map.velocityScale.y +
72 lhs->getZOrder() * lhs->map.velocityScale.z;
73 float rhsZ = rhs->getCenter().x * rhs->map.velocityScale.x +
74 rhs->getCenter().y * rhs->map.velocityScale.y +
75 rhs->getZOrder() * rhs->map.velocityScale.z;
76 return (lhsZ < rhsZ);
77 }
78};
79} // anonymous namespace
80

Callers

nothing calls this directly

Calls 2

getCenterMethod · 0.80
getZOrderMethod · 0.45

Tested by

no test coverage detected