浏览代码

improve the heading

tags/2.16.1
Caven Chen 3 年前
父节点
当前提交
906564fb28
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5
    0
      modules/math/heading.js

+ 5
- 0
modules/math/heading.js 查看文件

@@ -35,6 +35,11 @@ export default function heading(start, end) {
v,
new Cesium.Cartesian3()
)

if (isNaN(vector.x) || isNaN(vector.y) || isNaN(vector.z)) {
return 0
}

Cesium.Cartesian3.normalize(vector, vector)
let heading = Math.atan2(vector.y, vector.x) - Cesium.Math.PI_OVER_TWO


正在加载...
取消
保存