MultiplayerMinesweeper/client/scripts/util.js

12 lines
251 B
JavaScript
Raw Permalink Normal View History

export function randomNumber(min, max) {
return Math.floor(Math.random() * (max - min) + min);
}
2022-06-23 19:27:36 +00:00
export function ID(id) {
return document.getElementById(id)
}
export function clamp(num, min, max) {
return Math.min(Math.max(num, min), max);
}