Vector2.Normalize Method (Vector2)

Creates a unit vector from the specified vector. The result is a vector one unit in length pointing in the same direction as the original vector.

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

public static Vector2 Normalize (
         Vector2 value
)

Parameters

value
Type: Vector2
Source Vector2.

Return Value

The created unit vector.

Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone

Community Additions

ADD
Show: