pub fn within(value: u64, min: Option<u64>, max: Option<u64>) -> boolExpand description
Whether a value satisfies an optional >= min / <= max pair (an absent
bound never constrains).
ยงExamples
use coding_tools::tree::within;
assert!(within(10, Some(5), Some(20)));
assert!(!within(3, Some(5), None)); // below min
assert!(!within(30, None, Some(20))); // above max
assert!(within(10, None, None)); // unbounded