random-depth
Generate a random depth, in meters. Depths are always negative.
Install
$ npm install --save random-depth
Usage
var randomDepth = ; // API// - randomDepth();// - randomDepth(options); // options:// - min : default -10994// - max : default 0// - fixed: default 5 ;// => -2126.95039
By default, includes 5 digits of accuracy after the decimal. Can override with the fixed
option.
// => -1542.11
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.
// => -718.41976
Related
- random-altitude - Generate a random altitude, in meters.
- random-coordinates - Generate a random coordinates, which are latitude and longitude, comma separated.
- random-latitude - Generate a random latitude.
- random-longitude - Generate a random longitude.
- random-geohash - Generate a random geohash.
- random-geojson - Generate a random geojson.
- random-country - Return a random country.
- random-lang - Return a random language name.
Contributing
Pull requests and stars are highly welcome.
For bugs and feature requests, please create an issue.