[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:
@ -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">
|
||||
|
||||
Reference in New Issue
Block a user