From: Ruben Beltran del Rio Date: Sat, 17 Feb 2024 00:12:31 +0000 (+0100) Subject: Get rid of floor X-Git-Url: https://git.r.bdr.sh/rbdr/r.bdr.sh/commitdiff_plain/672c9cfeface5336603ed84b3a913870ab53b2c8?ds=sidebyside Get rid of floor --- diff --git a/js/animation.js b/js/animation.js index 6a67699..71d5aa3 100644 --- a/js/animation.js +++ b/js/animation.js @@ -1,7 +1,7 @@ (function () { var K = document.querySelector('canvas'), - { random: R, PI, cos: C, sin: S, floor, atan2: A } = Math, + { random: R, PI, cos: C, sin: S, atan2: A } = Math, id = p => p, spn = rad => p => ({ x: p.x + rad * C(l), @@ -18,7 +18,7 @@ draw = H[r(H.length)], pos = P[r(P.length)] function r(x) { - return floor(R() * x) + return ~~(R() * x) } function sqr(i) {