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