summaryrefslogtreecommitdiff
path: root/src/node_modules/chance/docs/location/altitude.md
blob: 01cc6125cf5a36676f4943191a3d2c0fe4b1a7ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# 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
```