-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
Probably related to #138.
Min repro:
#[cfg(test)]
mod tests {
use rstar::RTree;
#[test]
fn test() {
let mut rtree = RTree::new();
rtree.insert([-1231069110, 165759396]);
rtree.insert([781046969, 1474650861]);
rtree.insert([2044084841, -178727451]);
rtree.insert([477217386, 1765868819]);
rtree.insert([1257259285, -1226428015]);
rtree.insert([-1802029933, -488481506]);
rtree.insert([-1786107855, 2050884187]);
}
}
Integer overflow is on this line:
Line 180 in 9f8c6b6
self.lower.component_wise(&self.upper, |x, y| (x + y) / two) |
The fix is probably to write this as:
x + (y - x) / two
rmanoka
Metadata
Metadata
Assignees
Labels
No labels