direction

The array must not be empty. Normalizes the array to have length 1. The resulting array has unit length but the same direction as the original array. This is the array divided by its Euclidean norm. The array must not be empty. Its Euclidean norm cannot be zero.

Return

the normalized array

Parameters

array

the input array. Cannot be empty.