소스 검색

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…
취소
저장