1
0
forked from mirrors/0ad
Files
0ad/binaries/data/mods/public/simulation/helpers/Random.js
T
mimo 14aaa7c640 add some missing semicolon
This was SVN commit r17059.
2015-09-21 21:08:58 +00:00

10 lines
210 B
JavaScript

/**
* 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);