( a: Interval | IntervalResult, b: Interval | IntervalResult )
| 112 | * If inputs are IntervalResults, propagates errors (empty, entire, singular). |
| 113 | */ |
| 114 | export function div( |
| 115 | a: Interval | IntervalResult, |
| 116 | b: Interval | IntervalResult |
| 117 | ): IntervalResult { |
| 118 | const unwrapped = unwrapOrPropagate(a, b); |
| 119 | if (!Array.isArray(unwrapped)) return unwrapped; |
| 120 | const [aVal, bVal] = unwrapped; |
| 121 | return _div(aVal, bVal); |
| 122 | } |
| 123 | |
| 124 | /** |
| 125 | * Internal division that works on plain Intervals. |