are-boxes-intersecting
function areBoxesIntersecting(closed: boolean, a: number[][], b: number[][]): boolean
Defined in boxes/are-boxes-intersecting.ts:14
Returns true
if the 2 given axis-aligned rectangular boxes intersect.
- exact: not susceptible to floating point round-off
Note!
Green circles are draggable!
Parameters:
Name | Type | Description |
---|---|---|
closed | boolean | if true , interpret boxes as being closed (i.e. they contain their border), otherwise open. |
a | number[][] | an axis-aligned rectangular box (given by an array of two points, e.g. [[1,2], [3,4]] ) |
b | number[][] | another axis-aligned rectangular box |