瀏覽代碼

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


Loading…
取消
儲存