Logo

0x5a.live

for different kinds of informations and explorations.

GitHub - sindresorhus/random-float: Generate a random float

Generate a random float. Contribute to sindresorhus/random-float development by creating an account on GitHub.

Visit SiteGitHub - sindresorhus/random-float: Generate a random float

GitHub - sindresorhus/random-float: Generate a random float

Generate a random float. Contribute to sindresorhus/random-float development by creating an account on GitHub.

Powered by 0x5a.live ๐Ÿ’—

random-float

Generate a random float

Install

$ npm install random-float

Usage

import randomFloat from 'random-float';

randomFloat(5);
//=> 4.401887938147411

randomFloat(10, 100);
//=> 72.34217455144972

API

randomFloat(maximum?)

Returns an float from 0 to maximum.

randomFloat(minimum, maximum)

Returns an float from minimum to maximum.

minimum

Type: number
Default: 0

Minimum float to return.

maximum

Type: number
Default: 1

Maximum float to return.

Related

NodeJS Resources

are all listed below.

Resources

listed to get explored on!!

Made with โค๏ธ

to provide different kinds of informations and resources.