mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
[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:
parent
f91db3dc58
commit
308dbb8c63
73 changed files with 588 additions and 105 deletions
|
|
@ -130,7 +130,7 @@ Ref<Texture2D> EditorTexturePreviewPlugin::generate(const Ref<Resource> &p_from,
|
|||
if (new_size.y > p_size.y) {
|
||||
new_size = Vector2(new_size.x * p_size.y / new_size.y, p_size.y);
|
||||
}
|
||||
Vector2i new_size_i = Vector2i(new_size).max(Vector2i(1, 1));
|
||||
Vector2i new_size_i = Vector2i(new_size).maxi(1);
|
||||
img->resize(new_size_i.x, new_size_i.y, Image::INTERPOLATE_CUBIC);
|
||||
post_process_preview(img);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue