GSDP:GAM100/CProcessing/randomInt()

From Inside
Jump to: navigation, search

randomInt()

Description

Gives a random int from 0 to INT_MAX.

Example

void update() 
{
    rectMode(CENTER);
    noStroke();
    for (int x = 0; x < canvasWidth; x += canvasWidth / 100)
    {
        fill(color(x * 2, 50, 50, alpha1));
        rect((float)x + (canvasWidth / 200), canvasHeight / 2.0f, (float)canvasWidth / 100.0f, randomInt() % canvasHeight);
    }
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>