mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +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()));
|
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;
|
[[nodiscard]] DeprecatedString to_deprecated_string() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue