summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Libraries/LibGfx/Point.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGfx/Point.h b/Userland/Libraries/LibGfx/Point.h
index 67c3ce89b8..606a4162c9 100644
--- a/Userland/Libraries/LibGfx/Point.h
+++ b/Userland/Libraries/LibGfx/Point.h
@@ -247,6 +247,13 @@ public:
return Point<U>(ceil(x()), ceil(y()));
}
+ template<typename U>
+ requires FloatingPoint<T>
+ [[nodiscard]] Point<U> to_floored() const
+ {
+ return Point<U>(AK::floor(x()), AK::floor(y()));
+ }
+
[[nodiscard]] DeprecatedString to_deprecated_string() const;
private: