aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32
diff options
context:
space:
mode:
Diffstat (limited to 'win32')
-rw-r--r--win32/PlatWin.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index ec89479ab..85810dd14 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -1291,8 +1291,9 @@ static int Delta(int difference) {
return 0;
}
+// Round to integer, with halfway cases rounding down.
static float RoundFloat(float f) {
- return static_cast<float>(static_cast<int>(f+0.5f));
+ return std::floor(f+0.5f);
}
void SurfaceD2D::LineTo(int x_, int y_) {