MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / randChoice

Function randChoice

src/tools/texture-lab/Controls.jsx:2111–2111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2109 const randInt = (min, max) => Math.floor(rand(min, max + 1));
2110 const randBool = () => Math.random() > 0.5;
2111 const randChoice = arr => arr[Math.floor(Math.random() * arr.length)];
2112 const randColor = () =>
2113 '#' +
2114 Math.floor(Math.random() * 16777215)

Callers 1

randomizeParamsForTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected