@aotearoan/neon
Version:
Neon is a lightweight design library of Vue 3 components with minimal dependencies.
22 lines (21 loc) • 932 B
JavaScript
class i {
static rand(u) {
return i.mulberry32(i.cyrb128(u)[0]);
}
static cyrb128(u) {
let t = 1779033703, l = 3144134277, r = 1013904242, h = 2773480762;
for (let e = 0, a; e < u.length; e++)
a = u.charCodeAt(e), t = l ^ Math.imul(t ^ a, 597399067), l = r ^ Math.imul(l ^ a, 2869860233), r = h ^ Math.imul(r ^ a, 951274213), h = t ^ Math.imul(h ^ a, 2716044179);
return t = Math.imul(r ^ t >>> 18, 597399067), l = Math.imul(h ^ l >>> 22, 2869860233), r = Math.imul(t ^ r >>> 17, 951274213), h = Math.imul(l ^ h >>> 19, 2716044179), [(t ^ l ^ r ^ h) >>> 0, (l ^ t) >>> 0, (r ^ t) >>> 0, (h ^ t) >>> 0];
}
static mulberry32(u) {
return () => {
let t = u += 1831565813;
return t = Math.imul(t ^ t >>> 15, t | 1), t ^= t + Math.imul(t ^ t >>> 7, t | 61), ((t ^ t >>> 14) >>> 0) / 4294967296;
};
}
}
export {
i as NeonRandomUtils
};
//# sourceMappingURL=NeonRandomUtils.es.js.map