Appearance
KBE3D / KBCore / Cesium / Math / clampToLatitudeRange
函数: clampToLatitudeRange()
clampToLatitudeRange(
angle:number):number
Convenience function that clamps a latitude value, in radians, to the range [<code>-Math.PI/2</code>, <code>Math.PI/2</code>). Useful for sanitizing data before use in objects requiring correct range.
参数
angle
number
The latitude value, in radians, to clamp to the range [<code>-Math.PI/2</code>, <code>Math.PI/2</code>).
返回
number
The latitude value clamped to the range [-Math.PI/2, Math.PI/2).
示例
ts
// Clamp 108 degrees latitude to 90 degrees latitude
const latitude = Cesium.Math.clampToLatitudeRange(Cesium.Math.toRadians(108.0));