# Float is turned into a NaN within timerevent function?

**URL:** <https://forum.kirupa.com/t/float-is-turned-into-a-nan-within-timerevent-function/318104>\
**Category:** flash\
**Created:** [January 10, 2011, 10:39pm UTC](https://forum.kirupa.com/t/float-is-turned-into-a-nan-within-timerevent-function/318104 "2011-01-10T22:39:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cermunnos](https://avatars.discourse-cdn.com/v4/letter/c/ebca7d/32.png) [@cermunnos](https://forum.kirupa.com/u/cermunnos)\
**Post date:** [January 10, 2011, 10:39pm UTC](https://forum.kirupa.com/t/float-is-turned-into-a-nan-within-timerevent-function/318104/1 "2011-01-10T22:39:59Z")

</div>

🔗Hi,

Hi im having some problems pushing the two vars below into a timerupdate function while trying to stop them turning into NANs.

```auto
vx=2.3;
vy=1.3;

```

//they are declared private

Im passing 2 floats(vx, vy) into a class, then running a function called

```auto
update(e:TimerEvent){
trace("Update:",this.x, this.y ,vx, vy, );
this.x+=vx;
this.y+=vy
}

```

Right away in the trace within update, trace(“Update:”,this.x, this.y ,vx, vy, ); what happens is the output shows me the vx and vy have become NAN like so

Trace 1st pass: Update: 0 0 NaN NaN  
Trace 2st pass: Update: -107374182.4 -107374182.4 NaN NaN

Any ideas this seems like a very wierd bug, the vars are all set up properly IMO.
