Added #define NOMINMAX to preserve standard behavior of std::min and std::max. Is including <windows.h> here necessary?