Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bubkoo committed Apr 25, 2016
1 parent 15cdbaf commit 20d2432
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions index.js
Expand Up @@ -4,16 +4,21 @@ var clamp = require('clamp');
var assign = require('object-assign');
var randomFloat = require('random-floating');

var MAX = 8488;
var MIN = 0;

module.exports = function (options) {

options = assign({
fixed: 5,
min: 0,
max: 8848
min: MIN,
max: MAX
}, options);

options.min = clamp(options.min, 0, 8488);
options.max = clamp(options.max, 0, 8488);
options.min = clamp(options.min, MIN, MAX);
options.max = clamp(options.max, MIN, MAX);

options.inspected = true;

return randomFloat(options);
};
Expand Down
4 changes: 2 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "random-altitude",
"version": "1.0.0",
"version": "1.0.1",
"description": "Generate a random altitude, in meters.",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -45,6 +45,6 @@
"dependencies": {
"clamp": "^1.0.1",
"object-assign": "^4.0.1",
"random-floating": "^1.0.0"
"random-floating": "^1.0.1"
}
}

0 comments on commit 20d2432

Please sign in to comment.