| 403 | } |
| 404 | |
| 405 | static void pointBounds(Point2 p, double &xMin, double &yMin, double &xMax, double &yMax) { |
| 406 | if (p.x < xMin) xMin = p.x; |
| 407 | if (p.y < yMin) yMin = p.y; |
| 408 | if (p.x > xMax) xMax = p.x; |
| 409 | if (p.y > yMax) yMax = p.y; |
| 410 | } |
| 411 | |
| 412 | void LinearSegment::bound(double &xMin, double &yMin, double &xMax, double &yMax) const { |
| 413 | pointBounds(p[0], xMin, yMin, xMax, yMax); |