Game Maker Games, Articles, Tutorials & More

Game Maker Network


Howdy, Guest! Please sign in or register an account.

Print

random_integer

By Daniel · December 25, 2008

Generates a random integer between min and max, inclusive

// random_integer(min, max)
// Generates a random integer between min and max, INCLUSIVE

return argument0 + floor(random(argument1 - argument0 + 1));

Categories: Mathematics

Comments

There are no comments to display.

Post a Comment

You must be signed in to post comments.

Advertisement