NaN ???

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
SFR75
Posts: 17
Joined: April 3rd, 2007, 10:49 am

Hello,

Apparently the latest update for AE CS4 have introduced some rather strange effect - NaN value!
The script which worked fine before now crashes. After some debugging I have found the following.

to reproduce:

3D Solid layer,
property Orientation with just one key
keyInSpatialTangent(1) function returns the following

[0, NaN, 0]

Not only I've never seen NaN value in AE before, there is also no way to work with this value either.
Anybody has any idea what is that, other than a bug ?

Thanks M
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

Nan is a JavaScript reserved value that indicates that the result is "Not a Number". There are a number of ways you can get this, including trying to divide by zero. I'm not sure why you would get it for your spatial tangent though.

Dan
SFR75
Posts: 17
Joined: April 3rd, 2007, 10:49 am

Dan Ebberts wrote:Nan is a JavaScript reserved value that indicates that the result is "Not a Number". There are a number of ways you can get this, including trying to divide by zero. I'm not sure why you would get it for your spatial tangent though.

Dan
Hello Dan,

Yes, I googled it up and I know the meaning of NaN now. Even more, there is some way of handling NaN in AE.

There is a function isNan(x) which tests if x is NaN.
Also there are some numbers like Number.POSITIVE_INFINITY and Number.NEGATIVE_INFINITY - which are also NaNs (despite their Number.. predicate).

Oh well. If anyone has more information on that - thanks for sharing.

M.
Post Reply