mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Merge pull request #68386 from MewPurPur/snappedi-snappedf
Implement snappedi, snappedf, and Vector[2/3/4]i.snapped
This commit is contained in:
@@ -83,7 +83,14 @@
|
||||
<method name="sign" qualifiers="const">
|
||||
<return type="Vector4i" />
|
||||
<description>
|
||||
Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
|
||||
Returns a new vector with each component set to [code]1[/code] if it's positive, [code]-1[/code] if it's negative, and [code]0[/code] if it's zero. The result is identical to calling [method @GlobalScope.sign] on each component.
|
||||
</description>
|
||||
</method>
|
||||
<method name="snapped" qualifiers="const">
|
||||
<return type="Vector4i" />
|
||||
<param index="0" name="step" type="Vector4i" />
|
||||
<description>
|
||||
Returns a new vector with each component snapped to the closest multiple of the corresponding component in [param step].
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
||||
Reference in New Issue
Block a user