Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Vector2.Distance Method (Vector2%, Vector2%, Single%)

Calculates the distance between two vectors.

Namespace:  Microsoft.Xna.Framework
Assembly:  Microsoft.Xna.Framework.Math (in Microsoft.Xna.Framework.Math.dll)

'Declaration
Public Shared Sub Distance ( _
	ByRef value1 As Vector2, _
	ByRef value2 As Vector2, _
	<OutAttribute> ByRef result As Single _
)

Parameters

value1
Type: Microsoft.Xna.Framework.Vector2%
Source vector.
value2
Type: Microsoft.Xna.Framework.Vector2%
Source vector.
result
Type: System.Single%
[OutAttribute] The distance between the vectors.

Silverlight

Supported in: 5

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2015 Microsoft