# Width/2 producing strange fluctuations

**URL:** <https://forum.kirupa.com/t/width-2-producing-strange-fluctuations/281509>\
**Category:** Uncategorized\
**Created:** [February 10, 2009, 3:04am UTC](https://forum.kirupa.com/t/width-2-producing-strange-fluctuations/281509 "2009-02-10T03:04:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dandylion13](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@dandylion13](https://forum.kirupa.com/u/dandylion13)\
**Post date:** [February 10, 2009, 3:04am UTC](https://forum.kirupa.com/t/width-2-producing-strange-fluctuations/281509/1 "2009-02-10T03:04:41Z")

</div>

Hey Everyone,

\*\*EDITED TO AVOID CONFUSION 🙂 \*\*

I’m sure this is a really basic problem and hope someone can steer me in the right direction.

I have moving objects on stage all with a width of exactly 100 pixels. They’re part of a collision array. I need to know their radii so I created a variable that looks like this:

radius = objectName.width/2;

You would think that this would result in 50. However, when I do a trace of their values in an enterFrame loop, I get a range of numbers that looks like this when the objects are standing still:

```auto

51.325
52.075
50
50
50
50
52.075
50
50
50
50
50
50
50
50
50
50
50
50
50
50
51.325
52.075
50
50
50
50
52.075
50
50

```

… and so on!

As you can see, some of the fluctuations are quite big. When the objects start moving, I see numbers that look like this:

```auto

50.725
52.15
51.975
50
50.725
52.15
51.975
50.725
52.15
51.975
52.15
51.975
51.975

```

I’m sure this is something very basic.

Does anyone have any idea what the problem could be?

\*\*EDITED: Update \*\*

I did some more checking. If I use trace(width/2) inside the enterFame loop of the object’s class itself, I see the same fluctuations.

However, when I declare a \_radius property in the constructor and initialise it as:

\_radius = width/2;

the number remains stable.

Any ideas?

Thanks!! 🙂
