Math.random()

Generate a random number within the specified range.

Usage

Hover over inputs/exits for more info.

var Math = require('machinepack-math');


// Generate a random number within the specified range.

Math.random({

min: 1,

max: 1,

floating: true,

}).execSync();

Inputs

min

The minimum acceptable number to generate

1
max

The maximum acceptable number to generate

1
floating

Whether or not the generated number should be a floating point number (decimal).

true

Exits

error

An unexpected error occurred.

success

OK.

1