Click or drag to resize

Vector2DistanceSquaredTo Method

Returns the squared distance between this vector and `to`. This method runs faster than DistanceTo(Vector2), so prefer it if you need to compare vectors or need the squared distance for some formula.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public float DistanceSquaredTo(
	Vector2 to
)

Parameters

to
Type: GodotVector2
The other vector to use.

Return Value

Type: Single
The squared distance between the two vectors.
See Also