| 153 | typedef std::pair<df::coord, df::coord> coord_range; |
| 154 | |
| 155 | static void set_range(coord_range *target, df::coord p1, df::coord p2) |
| 156 | { |
| 157 | if (!p1.isValid() || !p2.isValid()) |
| 158 | { |
| 159 | *target = coord_range(); |
| 160 | } |
| 161 | else |
| 162 | { |
| 163 | target->first.x = std::min(p1.x, p2.x); |
| 164 | target->first.y = std::min(p1.y, p2.y); |
| 165 | target->first.z = std::min(p1.z, p2.z); |
| 166 | target->second.x = std::max(p1.x, p2.x); |
| 167 | target->second.y = std::max(p1.y, p2.y); |
| 168 | target->second.z = std::max(p1.z, p2.z); |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | static bool is_range_valid(const coord_range &target) |
| 173 | { |
no test coverage detected