colour.algebra.normalise_vector

colour.algebra.normalise_vector(a: ArrayLike) numpy.ndarray[source]

Normalise given vector \(a\).

Parameters

a (ArrayLike) – Vector \(a\) to normalise.

Returns

Normalised vector \(a\).

Return type

numpy.ndarray

Examples

>>> a = np.array([0.20654008, 0.12197225, 0.05136952])
>>> normalise_vector(a)  
array([ 0.8419703...,  0.4972256...,  0.2094102...])