/* Neon Rampage — small shared utilities. */ (function () { 'use strict'; var US = (window.US = window.US || {}); US.util = { rand: function (a, b) { return a + Math.random() * (b - a); }, randInt: function (a, b) { return Math.floor(a + Math.random() * (b - a + 1)); }, pick: function (arr) { return arr[Math.floor(Math.random() * arr.length)]; }, clamp: function (v, a, b) { return v < a ? a : v > b ? b : v; }, dist2: function (ax, ay, bx, by) { var dx = ax - bx, dy = ay - by; return dx * dx + dy * dy; }, fmt: function (n) { return String(Math.floor(n)).replace(/\B(?=(\d{3})+(?!\d))/g, ','); } }; })();