Skip to Content
๐ŸŽฒ Welcome to RandBox - Powerful JavaScript Random Data Generation Library! Learn More

altitude

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

Generate a random altitude, in meters.

randBox.altitude() => 1863.21417

By default, includes 5 digits of accuracy after the decimal. Can override with the fixed option.

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

By default, max of 8848m (height of Mount Everest), but this can be overridden with the max option.

randBox.altitude({ max: 1000 }) => 890.20665
Last updated on: