decorations: Decoration Positioner (#3800)
This commit is contained in:
parent
7345b1a1ea
commit
9be6fbf5ea
27 changed files with 610 additions and 266 deletions
|
|
@ -28,6 +28,10 @@ Vector2D Vector2D::floor() const {
|
|||
return Vector2D(std::floor(x), std::floor(y));
|
||||
}
|
||||
|
||||
Vector2D Vector2D::round() const {
|
||||
return Vector2D(std::round(x), std::round(y));
|
||||
}
|
||||
|
||||
Vector2D Vector2D::clamp(const Vector2D& min, const Vector2D& max) const {
|
||||
return Vector2D(std::clamp(this->x, min.x, max.x < min.x ? INFINITY : max.x), std::clamp(this->y, min.y, max.y < min.y ? INFINITY : max.y));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue