random()

Math / Random

Description

Generates random numbers. With one argument, returns a value from 0 up to (but not including) the parameter. With two arguments, returns a value from the first to the second.

Syntax

float random(float high) float random(float low, float high)

Parameters

NameTypeDescription
highfloatupper bound
lowfloatlower bound (optional)

Returns

float

Related

Under the Hood

Implementation in Processing.h / Processing.cpp:

Loading...