You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
I'm using Vector2i and Vector3i in my project and I need a "null value" for them. With float vectors you can use Vector.INF, but integer vectors don't have equivalent. I must rely on custom constants:
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add Vector2i.MAX constant, which is Vector2i(INT_MAX, INT_MAX) - basically integer equivalent of infinity.
The same constant would be added to Vector3i and Vector4i.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Note that Vector2i/3i uses signed 32-bit integer, so INT_MAX value will be (2,147,483,647) for them (while the size of standard integer in Godot is signed 64-bit which is much larger).
Note that Vector2i/3i uses signed 32-bit integer, so INT_MAX value will be (2,147,483,647) for them (while the size of standard integer in Godot is signed 64-bit which is much larger).
Note that if #7210 is implemented, INT_MAX would vary depending on the build type.
Describe the project you are working on
A sophisticated GDScript plugin.
Describe the problem or limitation you are having in your project
I'm using Vector2i and Vector3i in my project and I need a "null value" for them. With float vectors you can use Vector.INF, but integer vectors don't have equivalent. I must rely on custom constants:
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add
Vector2i.MAX
constant, which isVector2i(INT_MAX, INT_MAX)
- basically integer equivalent of infinity.The same constant would be added to Vector3i and Vector4i.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If this enhancement will not be used often, can it be worked around with a few lines of script?
Yes, with custom constants. But it's inconvenient, because they can't be global, so the code becomes verbose.
Is there a reason why this should be core and not an add-on in the asset library?
Only the workaround can be an addon.
The text was updated successfully, but these errors were encountered: