From Wiring

Jump to: navigation, search
This page is intended as a reference for core developers only, and the content is only changed after a consensus has been reached through discussion of any such changes. Please use the Discussion page to talk about any changes or issues you have with the current implementation.
Classification Math Methods
Suggested location WMath.h
C++ required No
Timing constraints None
Version introduced 1.0 (0100)
Framework dependencies None
int32_t random(int32_t howsmall, int32_t howbig)
Required? Yes
Issues None



Generates random numbers.

Black Box Input

The smallest and biggest values are provided.

Black Box Output

A random float between the smallest and the biggest value is return.


None. Single signature only.


Each time the random() function is called, it returns an unexpected value within the specified range. If one parameter is passed to the function it will return a float between zero and the value of the parameter. The function call random(5) returns values between 0 and 5. If two parameters are passed, it will return a float with a value between the the parameters.

Proposed Changes

Personal tools