(children: &mut [ChildRef], axis: usize)
| 220 | } |
| 221 | |
| 222 | fn sort_children_by_axis(children: &mut [ChildRef], axis: usize) { |
| 223 | children.sort_by(|a, b| { |
| 224 | let va = if axis == 0 { |
| 225 | a.bbox.min_lng |
| 226 | } else { |
| 227 | a.bbox.min_lat |
| 228 | }; |
| 229 | let vb = if axis == 0 { |
| 230 | b.bbox.min_lng |
| 231 | } else { |
| 232 | b.bbox.min_lat |
| 233 | }; |
| 234 | va.partial_cmp(&vb).unwrap_or(std::cmp::Ordering::Equal) |
| 235 | }); |
| 236 | } |
no test coverage detected