MCPcopy Index your code
hub / github.com/DavidHDev/react-bits / randInt

Function randInt

src/tools/texture-lab/Controls.jsx:2109–2109  ·  view source on GitHub ↗
(min, max)

Source from the content-addressed store, hash-verified

2107const randomizeParamsForType = type => {
2108 const rand = (min, max) => Math.random() * (max - min) + min;
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 = () =>

Callers 1

randomizeParamsForTypeFunction · 0.85

Calls 1

randFunction · 0.70

Tested by

no test coverage detected