random-latitude

1.0.1 • Public • Published

random-latitude

Generate a random latitude.

MIT License

build:? coverage:?

Install

$ npm install --save random-latitude 

Usage

var randomLatitude = require('random-latitude');
 
// API
// - randomLatitude();
// - randomLatitude(options);
 
// options:
// - min  : default -90
// - max  : default 90
// - fixed: default 5
 
randomLatitude();
// => 57.99514

By default includes 5 fixed digits after decimal, can specify otherwise.

randomLatitude({ fixed: 7 })
// => -29.6443133

By default includes entire range of allowed longitudes, can specify a min and/or max to bound it:

randomLatitude({min: 38.7, max: 38.9});
// => -38.82358

Related

Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please create an issue.

Package Sidebar

Install

npm i random-latitude

Weekly Downloads

619

Version

1.0.1

License

MIT

Last publish

Collaborators

  • bubkoo