# Math.random(num = 1)

**URL:** https://es.discourse.group/t/math-random-num-1/1495
**Category:** 💡 Ideas
**Created:** [October 31, 2022, 10:11pm UTC](https://es.discourse.group/t/math-random-num-1/1495 "2022-10-31T22:11:35Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![theScottyJam](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/thescottyjam/32/616_2.png) [@theScottyJam](https://es.discourse.group/u/theScottyJam)
#### Post date: [November 1, 2022, 8:43pm UTC](https://es.discourse.group/t/math-random-num-1/1495/4 "2022-11-01T20:43:33Z")

</div>

What I'd really like to see is a more full-fledged random API for JavaScript. So, you'd have functions like `randomInt(start, end)`, `randomFloat(start, end)`, `randomBoolean()`, maybe you can even have different randomFloat() functions that generate numbers over configurable distributions. The ability to seed multiple independent generators would be nice as well.

I had started a bit of a discussion around this in the past: [A more complete random API?](https://es.discourse.group/t/a-more-complete-random-api/842)

---

_[View the full topic](https://es.discourse.group/t/math-random-num-1/1495)._
