Skip to content

Commit

Permalink
Improve random selection of array elements to fix header animations (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje authored and mik-laj committed Nov 5, 2019
1 parent f7251fc commit 25ffe88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion landing-pages/src/js/headerAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const DRAW_SAFE_AREA = false;

const randomBetween = (from, to) => from + Math.random() * (to - from);
const randomInt = (from, to) => Math.round(randomBetween(from, to));
const randomItem = (arr) => arr[randomInt(0, arr.length)];
const randomItem = (arr) => arr[randomInt(0, arr.length - 1)];

class Polygon {
constructor(pos, vectors) {
Expand Down

0 comments on commit 25ffe88

Please sign in to comment.