This looks quite useful. Given that Math.random() returns a float, what drove your decision to make int the default return type in the numerical instances such as rando(5) and rando(5,10) instead of float? Was it an assumption that most people specifying numbers were looking for ints or something else?
Thanks! That's a great thought. And yes, that's exactly right. I've seen ints as a much more common use case than floats (excluding [0-1)), so I decided to make that the easier of the two. If you have other thoughts on the project, I'm always interested to hear feedback. You can leave a comment here, DM me on here, or create a pull request on my GitHub.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This looks quite useful. Given that Math.random() returns a float, what drove your decision to make int the default return type in the numerical instances such as rando(5) and rando(5,10) instead of float? Was it an assumption that most people specifying numbers were looking for ints or something else?
Thanks! That's a great thought. And yes, that's exactly right. I've seen ints as a much more common use case than floats (excluding [0-1)), so I decided to make that the easier of the two. If you have other thoughts on the project, I'm always interested to hear feedback. You can leave a comment here, DM me on here, or create a pull request on my GitHub.