Use dedicated CRT function to round the value with MSVC
This commit is contained in:
parent
4b491c19a2
commit
32cc9317f2
1 changed files with 1 additions and 1 deletions
|
|
@ -117,7 +117,7 @@
|
|||
wxASSERT_MSG(x > (double)INT_MIN - 0.5 && x < (double)INT_MAX + 0.5,
|
||||
wxT("argument out of supported range"));
|
||||
|
||||
#if defined(HAVE_ROUND)
|
||||
#if defined(HAVE_ROUND) || defined(__VISUALC__)
|
||||
return int(round(x));
|
||||
#else
|
||||
return (int)(x < 0 ? x - 0.5 : x + 0.5);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue