Vector4.DistanceSquared Method (Microsoft.Xna.Framework)

Returns the squared distance between two vectors.

Namespace: Microsoft.Xna.Framework
Assembly: MonoGame.Framework (MonoGame.Framework.dll
  • C#
  • VB
  • F#
public static float DistanceSquared(
	Vector4 value1, 
	Vector4 value2

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.


Type: Microsoft.Xna.Framework.Vector4
The first vector.
Type: Microsoft.Xna.Framework.Vector4
The second vector.

Return Value

Type: System.Single
The squared distance between two vectors.
Supported in:

 Windows DirectX Desktop
 Linux Desktop
 Windows OpenGL Desktop