Click or drag to resize
Ab4d.SharpEngine logo

MathUtilsOrthonormalize Method

Orthonormalizes a list of vectors.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public static void Orthonormalize(
	Vector3[] destination,
	params Vector3[] source
)

Parameters

destination  Vector3
The list of orthonormalized vectors.
source  Vector3
The list of vectors to orthonormalize.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when source or destination is null.
ArgumentOutOfRangeExceptionThrown when destination is shorter in length than source.
Remarks

Orthonormalization is the process of making all vectors orthogonal to each other and making all vectors of unit length. This means that any given vector will be orthogonal to any other given vector in the list.

Because this method uses the modified Gram-Schmidt process, the resulting vectors tend to be numerically unstable. The numeric stability decreases according to the vectors position in the list so that the first vector is the most stable and the last vector is the least stable.

See Also