diff --git a/Userland/Libraries/LibGfx/Point.h b/Userland/Libraries/LibGfx/Point.h index 7b9faebe16..88afb4147d 100644 --- a/Userland/Libraries/LibGfx/Point.h +++ b/Userland/Libraries/LibGfx/Point.h @@ -13,6 +13,7 @@ #include #include #include +#include namespace Gfx { @@ -239,6 +240,12 @@ public: return Point(*this); } + template + [[nodiscard]] Point to_rounded() const + { + return Point(roundf(x()), roundf(y())); + } + [[nodiscard]] String to_string() const; private: