1
0
forked from 0ad/0ad
0ad/binaries/data/mods/public/simulation/helpers/Random.js

10 lines
209 B
JavaScript
Raw Normal View History

/**
* Returns a random integer from min (inclusive) to max (exclusive)
*/
function RandomInt(min, max)
{
return Math.floor(min + Math.random() * (max-min))
}
Engine.RegisterGlobal("RandomInt", RandomInt);