-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Currently Math.random() * boxSize is used to set the delta between min and max (=box length) which will on average only give 0.5*boxSize reducing the box area by a factor of 4.
Lines 14 to 20 in 3a6f0f0
| function addRandomBox(arr, boxSize) { | |
| const x = Math.random() * (100 - boxSize); | |
| const y = Math.random() * (100 - boxSize); | |
| const x2 = x + Math.random() * boxSize; | |
| const y2 = y + Math.random() * boxSize; | |
| arr.push(x, y, x2, y2); | |
| } |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working