# Round To

**URL:** https://forum.makecode.com/t/round-to/4737
**Category:** Show & Tell
**Tags:** extension
**Created:** [December 2, 2020, 2:34am UTC](https://forum.makecode.com/t/round-to/4737 "2020-12-02T02:34:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)
#### Post date: [December 2, 2020, 2:34am UTC](https://forum.makecode.com/t/round-to/4737/1 "2020-12-02T02:34:55Z")

</div>

A small extension I made (that I ALWAYS need) that adds a block to the math namespace.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/6/691af68ea19d0d47e6b393b4640fea617eee3ecd.png)

The extension -

### rishiporwal/roundto

Basically, it rounds a number to the nearest multiple of \_\_\_, not just to the nearest whole number. It also has “floor”, “ceiling”, and “truncate”. (There are some bugs that might happen)

---

<div class="post-metadata">

### Author: ![shakao](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shakao/32/113_2.png) [@shakao](https://forum.makecode.com/u/shakao)
#### Post date: [December 2, 2020, 7:43pm UTC](https://forum.makecode.com/t/round-to/4737/2 "2020-12-02T19:43:55Z")

</div>

Awesome!! This is exactly the block I always wish for when I’m doing random procedural drawing stuff in Arcade 😃 Can’t wait to use it in a project!
