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:
parent
26e56bdd08
commit
78aad28dba
1 changed files with 7 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue