Index: ui/gfx/geometry/safe_integer_conversions.h |
diff --git a/ui/gfx/geometry/safe_integer_conversions.h b/ui/gfx/geometry/safe_integer_conversions.h |
index 4d289ecabafb665386b25ea58704cea22d737440..58ed2a9336ea12a2d2e632d13b50851cdcad83b8 100644 |
--- a/ui/gfx/geometry/safe_integer_conversions.h |
+++ b/ui/gfx/geometry/safe_integer_conversions.h |
@@ -30,6 +30,14 @@ inline int ToCeiledInt(float value) { |
return ClampToInt(std::ceil(value)); |
} |
+inline int ToFlooredInt(double value) { |
+ return ClampToInt(std::floor(value)); |
+} |
+ |
+inline int ToCeiledInt(double value) { |
+ return ClampToInt(std::ceil(value)); |
+} |
+ |
inline int ToRoundedInt(float value) { |
float rounded; |
if (value >= 0.0f) |