DataSharp/Mathematics/Vector.cs
/// <summary>
/// Returns a Vector whose length is 1 that has the same direction with the input Vector.
/// </summary>
/// <param name="vector">The input Vector that provides the direction information.</param>
/// <returns>A Vector whose length is 1 that has the same direction with the input Vector.</returns>
/// <exception cref="ArgumentNullException">If the input Vector is null.</exception>
Returns a Vector whose length is 1 that has the same direction with the input Vector.
Returns a Vector whose length is 1 that has the same direction with the input Vector .
public static Vector Normalize(Vector vector)
        {
            double length = vector.GetLength();
            Vector result = new Vector(vector);
            return result / length;
        }
public static Vector Normalize ( Vector vector ) { double length = vector . GetLength ( ) ; Vector result = new Vector ( vector ) ; return result / length ; }
Returns a Vector whose length is 1 that has the same direction with the input Vector.
Returns a Vector whose length is 1 that has the same direction with the input Vector .
A Vector whose length is 1 that has the same direction with the input Vector.
A Vector whose length is 1 that has the same direction with the input Vector .
If the input Vector is null.
If the input Vector is null .
vector
Vector
The input Vector that provides the direction information.
The input Vector that provides the direction information .