# unwrapLongitudes

The positions of a path with each longitude moved to the copy nearest the
one before it, and the first to the copy nearest `referenceLng`, so every
step goes the short way (170 to -170 becomes 170 to 190). Only for drawing:
stored, exported and shared positions keep their own longitudes.

This is a function exported by `@mapcairn/core`, checked against version 0.2.0.

## Signature

```ts
import { unwrapLongitudes } from "@mapcairn/core";
 
function unwrapLongitudes(positions: readonly LatLng[], referenceLng: number): LatLng[];
```

## Parameters

- `positions` (`readonly LatLng[]`)
- `referenceLng` (`number`)

## Returns

`LatLng[]`

## See also

- [`LatLng`](https://docs.mapcairn.com/api/core/LatLng.md)

Source: [packages/core/src/globe/longitude.ts:30](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/globe/longitude.ts#L30)
