UNPKG

575 BMarkdownView Raw
1# depth
2
3```js
4// usage
5chance.depth()
6chance.depth({ fixed: 2 })
7chance.depth({ min: -1000 })
8```
9
10Generate a random depth, in meters. Depths are always negative
11
12```js
13chance.depth()
14=> -2126.95039
15```
16
17By default, includes 5 digits of accuracy after the decimal. Can override with the `fixed` option.
18
19```js
20chance.depth({ fixed: 2 })
21=> -1542.11
22```
23
24By default, maximum (or minimum depending on your frame of reference) depth of -2550 (depth of the Mariana Trench), but this can be overridden with the `min` option.
25
26```js
27chance.depth({ min: -1000 })
28=> -718.41976
29```