MultiplayerMinesweeper/client/scripts/util.js

12 lines
251 B
JavaScript

export function randomNumber(min, max) {
return Math.floor(Math.random() * (max - min) + min);
}
export function ID(id) {
return document.getElementById(id)
}
export function clamp(num, min, max) {
return Math.min(Math.max(num, min), max);
}