Browse Source

LayoutEngine/Round: use 'roundf' instead of 'ceilf'

This removes wrong calculations for scrollbar's position
due to wrong rounding in Element's SetScrollLeft/Top
Aleksey Kuleshov 11 years ago
parent
commit
6da3a04d2b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/Core/LayoutEngine.cpp

+ 1 - 1
Source/Core/LayoutEngine.cpp

@@ -282,7 +282,7 @@ Vector2f& LayoutEngine::Round(Vector2f& value)
 // Rounds a floating-point value to an integral value.
 float LayoutEngine::Round(float value)
 {
-	return ceilf(value);
+	return roundf(value);
 }
 
 void* LayoutEngine::AllocateLayoutChunk(size_t size)