Ralith / sieve-tree

6 stars 1 forks source link

Some inserted bounds don't pass `validate` #9

Closed grovesNL closed 4 days ago

grovesNL commented 5 days ago

This will panic during validate (assuming validate is correct):

#[test]
fn should_validate() {
    let mut t = SieveTree::<1, 2, Bounds<1>>::new();
    let a = Bounds {
        min: [5.],
        max: [10.],
    };
    let b = Bounds {
        min: [20.],
        max: [25.],
    };
    t.insert(a, a);
    t.insert(b, b);
    validate(&t);
}

element 1 origin [1500] outside of cell 8:[4] with bounds [1024]-[1279]

Ralith commented 4 days ago

Fixed in eedee1808b7cc6123246fa3df10762a0cf730dc9.