You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
508 B
30 lines
508 B
4 weeks ago
|
# altitude
|
||
|
|
||
|
```js
|
||
|
// usage
|
||
|
chance.altitude()
|
||
|
chance.altitude({ fixed: 7 })
|
||
|
chance.altitude({ max: 1000 })
|
||
|
```
|
||
|
|
||
|
Generate a random altitude, in meters.
|
||
|
|
||
|
```js
|
||
|
chance.altitude()
|
||
|
=> 1863.21417
|
||
|
```
|
||
|
|
||
|
By default, includes 5 digits of accuracy after the decimal. Can override with the `fixed` option.
|
||
|
|
||
|
```js
|
||
|
chance.altitude({ fixed: 7 })
|
||
|
=> 6897.8978386
|
||
|
```
|
||
|
|
||
|
By default, max of 8848m (height of Mount Everest), but this can be overridden with the `max` option.
|
||
|
|
||
|
```js
|
||
|
chance.altitude({ max: 1000 })
|
||
|
=> 890.20665
|
||
|
```
|