Garry's Mod Wiki

Vector:Distance2D

  number Vector:Distance2D( Vector otherVector )

Description

Returns the Euclidean distance between the vector and the other vector in 2D space. The Z axis is ignored.

This function is more expensive than Vector:Distance2DSqr. However, please see the notes for Vector:Distance2DSqr before using it as squared distances are not the same as Euclidean distances.

Arguments

1 Vector otherVector
The vector to get the distance to.

Returns

1 number
Distance between the vectors in 2D space.