Add randomInt()
This commit is contained in:
parent
b8ac3126da
commit
a283cae416
1 changed files with 5 additions and 0 deletions
|
@ -319,6 +319,11 @@ class BSPNode {
|
|||
}
|
||||
}
|
||||
|
||||
function randomInt(n) {
|
||||
max = Math.floor(n);
|
||||
return Math.floor(Math.random() * max);
|
||||
}
|
||||
|
||||
let grid;
|
||||
|
||||
new p5(p => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue