diff options
author | Neil <nyamatongwe@gmail.com> | 2017-04-17 09:26:28 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2017-04-17 09:26:28 +1000 |
commit | 602902a69c52c8db02b376853800694868d6e65d (patch) | |
tree | 629a8aae6796f15522c446baff27dfdb9510671d | |
parent | 6925b27e743dd040eb44793a614c2ae1505e2fba (diff) | |
download | scintilla-mirror-602902a69c52c8db02b376853800694868d6e65d.tar.gz |
Simplify expression.
-rw-r--r-- | win32/PlatWin.cxx | 3 |
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_) { |