MultiplayerMinesweeper/www/scripts/util.js
Alexander Bass fe794b69a9 Before starting work on only sending changes in world
Doing this to allow for stupidly big worlds (also better network usage)
2022-06-24 08:10:06 -04:00

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);
}