Use std::numeric_limits<float>::quiet_NaN()
NAN is a compiler specific constant that does not exist on visual studio. I also noticed that some NAN instances had been cast to float, whereas quiet_NaN is both 1) defined by the standard and 2) templated for the correct type. This is a much more portable method of getting a NaN value.
Showing
Please
register
or
sign in
to comment