lround() is available in Visual Studio 12

This commit is contained in:
Paul Cornett
2020-10-14 11:44:22 -07:00
parent 55992cc9e1
commit 0825b59553

View File

@@ -117,7 +117,7 @@
wxASSERT_MSG(x > (double)INT_MIN - 0.5 && x < (double)INT_MAX + 0.5, wxASSERT_MSG(x > (double)INT_MIN - 0.5 && x < (double)INT_MAX + 0.5,
wxT("argument out of supported range")); wxT("argument out of supported range"));
#if defined(HAVE_ROUND) || wxCHECK_VISUALC_VERSION(14) #if defined(HAVE_ROUND) || wxCHECK_VISUALC_VERSION(12)
return int(lround(x)); return int(lround(x));
#else #else
return (int)(x < 0 ? x - 0.5 : x + 0.5); return (int)(x < 0 ? x - 0.5 : x + 0.5);