# Decimal values for 'x' and 'y' properties of a DisplayObject

**URL:** <https://forum.kirupa.com/t/decimal-values-for-x-and-y-properties-of-a-displayobject/304783>\
**Category:** flash\
**Created:** [February 13, 2010, 8:22pm UTC](https://forum.kirupa.com/t/decimal-values-for-x-and-y-properties-of-a-displayobject/304783 "2010-02-13T20:22:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josflos](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@Josflos](https://forum.kirupa.com/u/Josflos)\
**Post date:** [February 13, 2010, 8:22pm UTC](https://forum.kirupa.com/t/decimal-values-for-x-and-y-properties-of-a-displayobject/304783/1 "2010-02-13T20:22:29Z")

</div>

As far as I know, a pixel is a pixel.  
You can hardly move a DisplayObject half a pixel, can you?

Still the _x_ and _y_ properties of a DisplayObject allow values with two decimals.

A small test…

```php
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
function enterFrameHandler(e:Event):void {
    myDisplayObject.y = Number(myInputBox.text);
    trace(myDisplayObject.y);
}

```

… shows that this happens in steps of five (0, 0.05, 0.1, 0.15, etc.).  
Values like for example 0.16 get converted to 0.15.  
Also, the object moves 1 pixel as soon as it’s x/y value is .2

You would expect the _x_ and _y_ properties to convert the given numbers to integers, no?

I couldn’t find anything on this subject, neither on google nor on these forums  
([SIZE=1]_“The following words are either very common, too long, or too short and were not included in your search: x, y”_[/SIZE])

Does someone have a clue on the sense behind this?  
Thanks.
