function normalize( N, X, strideX, offsetX ) { // TODO: eventually remove this function once project has implemented comparable functionality as a standalone package (e.g., BLAS, which may avoid the naive approach susceptible to overflow/overflow due to summing squares and computing the square root)
	var xi;
	var m;
	var v;
	var i;

	m = 0.0;

	// Compute the vector magnitude...
	xi = offsetX;
	for ( i = 0; i < N; i++ ) {
		v = X[ xi ];
		m += v * v;
		xi += strideX;
	}
	m = sqrt( m );

	// Normalize the vector...
	xi = offsetX;
	for ( i = 0; i < N; i++ ) {
		X[ xi ] /= m;
	}
	return X;
}
Normalizes a vector.

@private
@param {NonNegativeInteger} N - number of elements
@param {NumericArray} X - strided array
@param {integer} strideX - stride
@param {NonNegativeInteger} offsetX - index offset
@returns {NumericArray} input array