# Add Math.randomrange()

**URL:** <https://es.discourse.group/t/add-math-randomrange/1027>\
**Category:** 💡 Ideas\
**Tags:** proposal\
**Created:** [October 14, 2021, 8:16am UTC](https://es.discourse.group/t/add-math-randomrange/1027 "2021-10-14T08:16:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AtlasLuca](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/atlasluca/32/1063_2.png) [@AtlasLuca](https://es.discourse.group/u/AtlasLuca)\
**Post date:** [October 14, 2021, 8:16am UTC](https://es.discourse.group/t/add-math-randomrange/1027/1 "2021-10-14T08:16:22Z")

</div>

# Add Math.randomrange() function

Currently if i want a math.random between a range ill need to multiply it.  
If this was implemented i could just do

```javascript
Math.randomrange(min, max);
Math.range(min, max); //An alias for randomrange

```

This would make random numbers between a range (which i need a lot for games and such) MUCH easier to make and i don't need to define it every time.

---

<div class="post-metadata">

**Author:** ![aclaymore](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/aclaymore/32/501_2.png) [@aclaymore](https://es.discourse.group/u/aclaymore)\
**Post date:** [October 14, 2021, 9:33am UTC](https://es.discourse.group/t/add-math-randomrange/1027/2 "2021-10-14T09:33:47Z")

</div>

related: [A more complete random API?](https://es.discourse.group/t/a-more-complete-random-api/842)
