MCPcopy Create free account
hub / github.com/axmolengine/axmol / TopX

Function TopX

3rdparty/clipper2/src/clipper.engine.cpp:127–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125 }
126
127 inline int64_t TopX(const Active& ae, const int64_t currentY)
128 {
129 if ((currentY == ae.top.y) || (ae.top.x == ae.bot.x)) return ae.top.x;
130 else if (currentY == ae.bot.y) return ae.bot.x;
131 else return ae.bot.x + static_cast<int64_t>(nearbyint(ae.dx * (currentY - ae.bot.y)));
132 // nb: std::nearbyint (or std::round) substantially *improves* performance here
133 // as it greatly improves the likelihood of edge adjacency in ProcessIntersectList().
134 }
135
136
137 inline bool IsHorizontal(const Active& e)

Callers 4

AddNewIntersectNodeMethod · 0.85
DoHorizontalMethod · 0.85
DoTopOfScanbeamMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected