Expressions/Scripts/Presets

Moderator: Paul Tuersley

 
SFR75
Topic Author
Posts: 17
Joined: Tue Apr 03, 2007 10:49 am

NaN ???

Tue Mar 30, 2010 6:28 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: 318
Joined: Sat Jun 26, 2004 10:01 am
Location: Folsom, CA
Contact:

Re: NaN ???

Tue Mar 30, 2010 8:01 am

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
Topic Author
Posts: 17
Joined: Tue Apr 03, 2007 10:49 am

Re: NaN ???

Wed Mar 31, 2010 12:55 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.

Who is online

Users browsing this forum: No registered users and 4 guests