Click or drag to resize

Vector2Snapped Method

Returns this vector with each component snapped to the nearest multiple of `step`. This can also be used to round to an arbitrary number of decimals.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public Vector2 Snapped(
	Vector2 step
)

Parameters

step
Type: GodotVector2
A vector value representing the step size to snap to.

Return Value

Type: Vector2
The snapped vector.
See Also