colour.algebra.normalise_vector#

colour.algebra.normalise_vector(a: FloatingOrArrayLike) FloatingOrNDArray[source]#

Normalise given vector \(a\).

Parameters

a (FloatingOrArrayLike) – 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...])