Hello!
I am asking myself: How do I check SphereToScreen result validity?
A call set vars with resulting data, but some times, when hotspots are out of screen, data is "NaN".
My point is that I don't know how to test "NaN"...
|
Quellcode
|
1
2
3
|
sphereToScreen(a, b, c, d);
if( c == NaN, trace(is NaN), trace(is not NaN));
if( c == Number.NaN, trace(is NaN), trace(is not NaN));
|
Above code does not work...
I tried to check against screen dimensions, but that fails too : NaN is both greater and lesser than any number ;)
regards,