UNPKG

bezier-mouse-js

Version:

Lightweight javascript library to mirror human-like mouse movements with Bézier curves.

10 lines (6 loc) 217 B
const { floor, random } = Math; class Utils { static choice = (items) => items[floor(random() * items.length)]; static randint = (min, max) => floor(random() * (max - min + 1)) + min; } module.exports = Utils;