1 | # depth
|
2 |
|
3 | ```js
|
4 | // usage
|
5 | chance.depth()
|
6 | chance.depth({ fixed: 2 })
|
7 | chance.depth({ min: -1000 })
|
8 | ```
|
9 |
|
10 | Generate a random depth, in meters. Depths are always negative
|
11 |
|
12 | ```js
|
13 | chance.depth()
|
14 | => -2126.95039
|
15 | ```
|
16 |
|
17 | By default, includes 5 digits of accuracy after the decimal. Can override with the `fixed` option.
|
18 |
|
19 | ```js
|
20 | chance.depth({ fixed: 2 })
|
21 | => -1542.11
|
22 | ```
|
23 |
|
24 | By 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
|
27 | chance.depth({ min: -1000 })
|
28 | => -718.41976
|
29 | ```
|