Skip to Content
🎲 欢迎使用 RandBox - 功能强大的 JavaScript 随机数据生成库! 了解详情

altitude

// 用法 randBox.altitude() randBox.altitude({ fixed: 7 }) randBox.altitude({ max: 1000 })

生成一个随机海拔高度,以米为单位。

randBox.altitude() => 1863.21417

默认情况下,在小数点后包含 5 位精度。可以使用 fixed 选项覆盖。

randBox.altitude({ fixed: 7 }) => 6897.8978386

默认情况下,最大值为 8848 米(珠穆朗玛峰的高度),但可以使用 max 选项覆盖。

randBox.altitude({ max: 1000 }) => 890.20665
最后更新于: