diff --git a/Userland/Libraries/LibGfx/Point.h b/Userland/Libraries/LibGfx/Point.h index 4aae55d35c..51a775f722 100644 --- a/Userland/Libraries/LibGfx/Point.h +++ b/Userland/Libraries/LibGfx/Point.h @@ -246,13 +246,19 @@ public: return Point(roundf(x()), roundf(y())); } + template + requires FloatingPoint + [[nodiscard]] Point to_ceiled() const + { + return Point(ceil(x()), ceil(y())); + } + [[nodiscard]] String to_string() const; private: T m_x { 0 }; T m_y { 0 }; }; - using IntPoint = Point; using FloatPoint = Point;