dont make trivial splits

main
Bel LaPointe 2023-12-28 21:58:49 -05:00
parent 48961fee2a
commit ccc4d7fbd2
1 changed files with 4 additions and 2 deletions

View File

@ -207,12 +207,14 @@ impl Inspection {
for i in 0..unstuck_spans.len() {
let mut span = unstuck_spans[i];
for split in scene_splits.iter() {
if &span.start < split && split < &span.stop { // TODO buffer
if &(span.start + 5.0) < split && split < &(span.stop - 5.0) { // TODO const
result.push(ContentSpan{start: span.start, stop: *split});
span.start = *split;
}
}
result.push(span); // TODO assert nontrivial
if span.stop - span.start > 2.0 {
result.push(span);
}
}
result
}