We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e49d3f8 commit ebeb0ffCopy full SHA for ebeb0ff
src/operations/misc.test.ts
@@ -123,6 +123,8 @@ describe('Interval', function () {
123
Interval.almostEqual(n, [2, 3])
124
n = Interval.abs(new Interval(2, 3))
125
126
+ n = Interval.abs(Interval.WHOLE)
127
+ Interval.almostEqual(n, Interval.EMPTY)
128
})
129
130
it('should compute the max value of two intervals', function () {
src/operations/misc.ts
@@ -309,7 +309,7 @@ export const wid = width
309
* @return {Interval}
310
*/
311
export function abs(x: Interval): Interval {
312
- if (utils.isEmpty(x)) {
+ if (utils.isEmpty(x) || utils.isWhole(x)) {
313
return constants.EMPTY
314
}
315
if (x.lo >= 0) {
0 commit comments