# Rounded variable

**URL:** https://forum.kirupa.com/t/rounded-variable/331487
**Category:** flash
**Created:** [August 11, 2013, 8:10am UTC](https://forum.kirupa.com/t/rounded-variable/331487 "2013-08-11T08:10:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![theicecube92](https://avatars.discourse-cdn.com/v4/letter/t/b2d939/32.png) [@theicecube92](https://forum.kirupa.com/u/theicecube92)
#### Post date: [August 11, 2013, 8:10am UTC](https://forum.kirupa.com/t/rounded-variable/331487/1 "2013-08-11T08:10:01Z")

</div>

Hi guys,  
I have a question regarding my project.  
So, I have var distance:Number = 0; I need this variable to show only rounded numbers.  
The ‘distance’ variable is constantly increasing with 0.05. So if ‘distance’ is currently at, let’s say 20.324561, I want it to show 20, if at 20.624561, then show 21 and so on…

Any help is highly appreciated! 🙂  
Thanks!
