Popularity
1.2
Stable
Activity
2.6
Growing
33
6
8
Programming language: JavaScript
License: MIT License
Tags:
Number
Math
Generator
Generate
Random
Rand
Point
Num
Gen
Min
Max
Randomize
Real
Floating
Float
Latest version: v2.0.0
random-float alternatives and similar modules
Based on the "Number" category.
Alternatively, view random-float alternatives based on common mentions on social networks and blogs.
-
round-to
Round a number to a specific number of decimal places: 1.234 → 1.2 -
unique-random
Generate random numbers that are consecutively unique
SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
Promo
surveyjs.io
Do you think we are missing an alternative of random-float or a related project?
README
random-float
Generate a random float
Install
$ npm install random-float
Usage
const randomFloat = require('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
- random-int - Generate a random integer
- random-item - Get a random item from an array
- random-boolean - Get a random boolean
- random-obj-key - Get a random key from an object
- random-obj-prop - Get a random property from an object
- unique-random - Generate random numbers that are consecutively unique
- unique-random-array - Get consecutively unique elements from an array
- crypto-random-string - Generate a cryptographically strong random string