MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / cmp

Method cmp

nodedb-spatial/src/rtree/search.rs:126–132  ·  view source on GitHub ↗
(&self, other: &Self)

Source from the content-addressed store, hash-verified

124
125impl Ord for HeapItem {
126 fn cmp(&self, other: &Self) -> std::cmp::Ordering {
127 // Reverse for min-heap (BinaryHeap is max-heap).
128 other
129 .dist
130 .partial_cmp(&self.dist)
131 .unwrap_or(std::cmp::Ordering::Equal)
132 }
133}
134
135/// Minimum distance from point to bbox (in degrees, approximate).

Callers 1

partial_cmpMethod · 0.45

Calls 1

partial_cmpMethod · 0.45

Tested by

no test coverage detected