randf

1.0.0 • Public • Published

randf

frozen

Returns random float between a range. If no range is specified, 0 (inclusive) to 1 (exclusive) is used. You can also pass a single number to specify a range between 0 and N.

var random = require('randf')
 
console.log( random() )       // => 0 ... 1
console.log( random(25) )     // => 0 ... 25
console.log( random(-1, 1) )  // => -1 ... 1

Usage

NPM

random([min, max])

Returns a new random number within the given range.

License

MIT, see LICENSE.md for details.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    10
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    10

Package Sidebar

Install

npm i randf

Weekly Downloads

10

Version

1.0.0

License

MIT

Last publish

Collaborators

  • mattdesl