Function: splitAtAntimeridian()
Defined in: antimeridian.ts:51
Split bounds whose east edge runs past 180° in two at the antimeridian, one part on each side. Bounds that end at or before 180° come back whole.
Both parts lie within [-180°, 180°] when bounds starts in [-180°, 180°)
and is at most 360° wide, as normalizeLongitudes and
unwrapBbox return them.
Parameters
bounds
readonly [number, number, number, number]
Returns
Example
splitAtAntimeridian([170, -10, 190, 10]);
// [[170, -10, 180, 10], [-180, -10, -170, 10]]
splitAtAntimeridian([10, -10, 20, 10]); // [[10, -10, 20, 10]]