Is this a operator overloading bug?

Tomas Lindquist Olsen tomas at famolsen.dk
Thu Jan 11 07:17:10 PST 2007


Leandro Lucarella wrote:

> David Medlock escribió:
> > Its not a bug, you didn't initialize the x,y and z members of
> > Vector3.
> > 
> > try:
> > 
> > struct Vector3
> > {
> >  float x =0, y =0, z =0;
> > ....
> > }
> 
> Is there a logical explanation about why floats are initialized to
> NAN and not zero?

http://www.digitalmars.com/d/faq.html#nan

-- 




More information about the Digitalmars-d mailing list