mirror of
https://github.com/acamarata/qibla.git
synced 2026-07-01 11:24:28 +00:00
27 lines
616 B
Markdown
27 lines
616 B
Markdown
[**@acamarata/qibla v1.1.1**](../README.md)
|
|
|
|
***
|
|
|
|
[@acamarata/qibla](../README.md) / compassDir
|
|
|
|
# Function: compassDir()
|
|
|
|
> **compassDir**(`bearing`): `"N"` \| `"NE"` \| `"E"` \| `"SE"` \| `"S"` \| `"SW"` \| `"W"` \| `"NW"`
|
|
|
|
Defined in: [index.ts:68](https://github.com/acamarata/qibla/blob/a59756bd074a18a3c9cea4311d135cfb23a5ec7d/src/index.ts#L68)
|
|
|
|
Eight-point compass abbreviation for a bearing.
|
|
|
|
## Parameters
|
|
|
|
### bearing
|
|
|
|
`number`
|
|
|
|
Bearing in degrees (0-360).
|
|
|
|
## Returns
|
|
|
|
`"N"` \| `"NE"` \| `"E"` \| `"SE"` \| `"S"` \| `"SW"` \| `"W"` \| `"NW"`
|
|
|
|
Two-letter compass abbreviation (N, NE, E, SE, S, SW, W, NW).
|