[X3D-Public] Testing for NaN in a Script?
Russ Kinter
pyth7 at verizon.net
Wed Feb 23 09:44:16 PST 2011
Hi All,
Anyway to test for NaN with ecmascript?
var x = parseFloat( number_as_string );
if(x!='NaN'){
send something legal to network;
}
nor if(x==NaN){
}
Doesn't work because Instant Player doesn't recognize the equality of NaN
Nor does creating a comparison NaN work:
var y = paseFloat( 'y');
var x = parseFloat( float_as_string );
if(x!=y){
send something legal to network;
}
Easy to do in Java of course
Thanks!
Russ Kinter
"All the fires of Cain's motivation cannot burn a love that's sound." -
Stacy Sutherland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20110223/e951885a/attachment.html>
More information about the X3D-Public
mailing list