| 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) |
no outgoing calls
no test coverage detected