mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-16 12:54:32 +00:00
14aaa7c640
This was SVN commit r17059.
10 lines
210 B
JavaScript
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);
|