[Core] Add scalar versions of Vector* min/max/clamp/snap(ped)

Convenience for a number of cases operating on single values
This commit is contained in:
A Thousand Ships
2024-03-03 14:37:52 +01:00
parent f91db3dc58
commit 308dbb8c63
73 changed files with 588 additions and 105 deletions

View File

@ -103,7 +103,7 @@ bool TextureButton::has_point(const Point2 &p_point) const {
point *= scale;
// finally, we need to check if the point is inside a rectangle with a position >= 0,0 and a size <= mask_size
rect.position = Point2().max(_texture_region.position);
rect.position = _texture_region.position.maxf(0);
rect.size = mask_size.min(_texture_region.size);
}