Library for manipulating numeric segments and rays.
Numberic segments or rays are two number arrays where null is infinity
[1.9,2], [null,5.3] , [-11, null] or [null,null] are valid inputs
intersects([2,5],[3,6])
=> true
intersects([2,5],[9,10])
=> false
includes([2,10],[3,6])
=> true
includes([2,null],[3,null])
=> true
includes([2,10],[9,null])
=> false
containsPoint([1,5],4)
=> true
containsPoint([1,null],4)
=> true
union([1,5],[2,6])
=> [1,6]
union([1,5],[6,7])
=> null
intersection([1,5],[4,6])
=> [4,5]
intersection([1,5],[4,null])
=> [4,5]
intersection([null,5],[4,null])
=> [4,5]
mask([1,10],[[null,2],[5,6],[9,15]])
=> [[1,2],[5,6],[9,10]]