diff options
author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-03-03 14:37:52 +0100 |
---|---|---|
committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-05-02 10:31:13 +0200 |
commit | 308dbb8c6359589ce7411027cecd777938e40bd7 (patch) | |
tree | 80a8cf2eff0d0c1ef1e7e0913b8616e0ee4e376a /doc/classes/Vector4i.xml | |
parent | f91db3dc58f1d6a0cb63d591515183b5a45cd3ba (diff) | |
download | redot-engine-308dbb8c6359589ce7411027cecd777938e40bd7.tar.gz |
[Core] Add scalar versions of `Vector*` `min/max/clamp/snap(ped)`
Convenience for a number of cases operating on single values
Diffstat (limited to 'doc/classes/Vector4i.xml')
-rw-r--r-- | doc/classes/Vector4i.xml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/classes/Vector4i.xml b/doc/classes/Vector4i.xml index f8a0026066..ade558dd06 100644 --- a/doc/classes/Vector4i.xml +++ b/doc/classes/Vector4i.xml @@ -57,6 +57,14 @@ Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component. </description> </method> + <method name="clampi" qualifiers="const"> + <return type="Vector4i" /> + <param index="0" name="min" type="int" /> + <param index="1" name="max" type="int" /> + <description> + Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component. + </description> + </method> <method name="distance_squared_to" qualifiers="const"> <return type="int" /> <param index="0" name="to" type="Vector4i" /> @@ -110,6 +118,13 @@ Returns a new vector with each component snapped to the closest multiple of the corresponding component in [param step]. </description> </method> + <method name="snappedi" qualifiers="const"> + <return type="Vector4i" /> + <param index="0" name="step" type="int" /> + <description> + Returns a new vector with each component snapped to the closest multiple of [param step]. + </description> + </method> </methods> <members> <member name="w" type="int" setter="" getter="" default="0"> |