1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:37:44 +00:00

LibGfx: Add Point::to_floored<T>()

This commit is contained in:
MacDue 2023-04-07 13:25:15 +01:00 committed by Linus Groh
parent 26e56bdd08
commit 78aad28dba

View file

@ -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: