+ 1

Pick random

How to use the famous pick random function? I used it on grasshopper, actually, idk if it's even a real function or something like, exclusive from there, like the drawbox function. Btw, I'm referring to a function that picks a random value from a var = [ 1 2 3 ]; Like thing.

13th Jan 2019, 10:31 PM
Grasshopper Hell Monkey
Grasshopper Hell Monkey - avatar
3 Réponses
+ 1
Hey, Try this 👍 var r = Math.floor(Math.random()*3+1); console.log(r);
13th Jan 2019, 10:41 PM
D_Stark
D_Stark - avatar
0
Hi, thanks, but can you explain more or tell me where i can find an explanation?
14th Jan 2019, 1:54 AM
Grasshopper Hell Monkey
Grasshopper Hell Monkey - avatar