Test if a value is NaN?

Get help using Construct 2

Post » Wed Jul 17, 2013 2:05 am

How could I test if a value is NaN in C2?

Edit: Figured out right after posting. One way to do it is to compare it against itself. If it's not equal to itself, it's NaN. So you'd do something like: if (Variable != Variable) { ... }.

I'm leaving this post here for reference in case someone else ends up needing this.Dalal2013-07-17 02:10:37
Image
B
10
S
3
G
2
Posts: 196
Reputation: 2,053

Return to How do I....?

Who is online

Users browsing this forum: Congrats2u, jhjconstruct, tarek2 and 6 guests