Skip to content

Instantly share code, notes, and snippets.

@dghez
Last active March 27, 2019 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dghez/94ad640528d859b011f72a750572b4be to your computer and use it in GitHub Desktop.
Save dghez/94ad640528d859b011f72a750572b4be to your computer and use it in GitHub Desktop.
Return random values, float or int
import RN from 'random-number';
let rand = RN.generator();
let randInt = (min, max) => {
return rand(min, max, true);
};
let randFloat = (min, max) => {
return rand(min, max, false);
};
export { randInt, randFloat };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment