Skip to main content

reachable

Function reachable 

Source
fn reachable<T: PartialOrd + Copy>(op: Op, min: T, max: T, target: T) -> bool
Expand description

Could any value in [min, max] satisfy x op target?

Ne and Contains are deliberately absent from the callers rather than answered here: a range only rules Ne out when it is a single point, which is a rounding error’s worth of pruning for a branch that is easy to get backwards.