On Friday, 27 May 2016 at 15:07:50 UTC, Adam D. Ruppe wrote:
On Friday, 27 May 2016 at 14:56:28 UTC, ArturG wrote:
float f;
if(f is float.init) "float init".writeln;
f = float.nan;
if(f is float.init) "float nan".writeln;
You changed it to a value that isn't float.init, so of course
it isn't going to match!
float.nan and float.init are NOT the same thing. float.init is
a kind of NAN, but not the same kind.
yes but i have to check for that when some one does
float.nan.checkThen!((f){ this fun should not run });
which should be the same as
float.init.checkThen!((f){ this fun should not run });