//==========Rand Int========== // Input: min, max, pm // Output: random integer between min and max // pm denotes plus or minus function RandomInt(min, max, pm) { min = Math.ceil(min); max = Math.floor(max); pm = pm || 0; var plusMinus = Math.random() < 0.5 ? -1 : 1; var random = Math.floor(Math.random() * (max - min + 1)) + min; return pm != 0 ? random * plusMinus : random; }
Manage space
Manage content
Integrations