Could someone post good IsNan IsInfinite and Sgn methods for float values?
Sofar I found these to work but sometimes they seem to fail
1 2 3 4 5 6 7 8
|
template <typename T> float sgn(T val) {
return (T(0) < val) - (val < T(0));
}
#ifndef isnan
inline bool isnan(double x) {
return x != x;
}
#endif
|
Thanks
Topic archived. No new replies allowed.