( x: Interval | IntervalResult, lo: Interval | IntervalResult, hi: Interval | IntervalResult )
| 208 | return 'maybe'; |
| 209 | } |
| 210 | |
| 211 | /** |
| 212 | * Greater than comparison for intervals. An `empty` operand gives `'false'` |
| 213 | * (`hasEmptyOperand`). |
| 214 | */ |
| 215 | export function greater( |
| 216 | a: Interval | IntervalResult, |
| 217 | b: Interval | IntervalResult |
| 218 | ): BoolInterval { |
| 219 | if (hasEmptyOperand(a, b)) return 'false'; |
| 220 | const unwrapped = unwrapOrPropagate(a, b); |
| 221 | if (!Array.isArray(unwrapped)) return 'maybe'; |
| 222 | const [aVal, bVal] = unwrapped; |
| 223 | if (aVal.lo > bVal.hi) return holds(a, b); |
| 224 | if (aVal.hi <= bVal.lo) return 'false'; |
| 225 | return 'maybe'; |
| 226 | } |
| 227 | |
| 228 | /** |
| 229 | * Greater than or equal comparison for intervals. An `empty` operand gives |
| 230 | * `'false'` (`hasEmptyOperand`). |
| 231 | */ |
| 232 | export function greaterEqual( |
| 233 | a: Interval | IntervalResult, |
| 234 | b: Interval | IntervalResult |
no test coverage detected