MultiplayerMinesweeper/util.js

8 lines
224 B
JavaScript
Raw Normal View History

2022-06-19 20:21:33 +00:00
function randomNumber(min, max) {
return Math.floor(Math.random() * (max - min) + min);
}
function clamp(number, min, max) {
return Math.max(min, Math.min(number, max));
}
module.exports = {randomNumber, clamp}