Skip to content

Commit

Permalink
improve math center
Browse files Browse the repository at this point in the history
  • Loading branch information
cavencj committed Jul 30, 2023
1 parent bb60ad5 commit a635094
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/math/center.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import { Cesium } from '../../namespace'
import { Transform } from '../transform'
import Position from '../position/Position'


export default function center(positions) {
if (positions && Array.isArray(positions)) {
let heightMax = 0 // 位置最高的点的高度
let heightMax = 0
positions.forEach(({ alt }) => (heightMax = Math.max(heightMax, alt)))

let boundingSphere = Cesium.BoundingSphere.fromPoints(
Expand Down

0 comments on commit a635094

Please sign in to comment.