描述
将相对于正北方向(顺时针为正)的方位角转换为 -180 到 +180 度之间的角度(顺时针为正),0 度为正北方向。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| angle | number | 0 到 360 度之间的角度 |
返回值
number -180 到 +180 度之间的方位角
安装
javascript
$ npm install @turf/helpers
import { azimuthToBearing } from "@turf/helpers";
const result = azimuthToBearing(...);javascript
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.azimuthToBearing(...);