MathHelper.Distance Method

Calculates the absolute value of the difference of two values.

Syntax

'Declaration
Public Shared Function Distance ( _
         value1 As Single, _
         value2 As Single _
) As Single 
public static float Distance (
         float value1,
         float value2
)
public:
static float Distance(
         float value1,
         float value2
)

Parameters

  • value1
    Type: Single
    Source value.
  • value2
    Type: Single
    Source value.

Return Value

Type: Single
Distance between the two values.

Requirements

Namespace: Microsoft.Xna.Framework

Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

See Also

Reference

MathHelper Class
MathHelper Members
Microsoft.Xna.Framework Namespace

Platforms

Windows Phone