colour.algebra.euclidean_distance#

colour.algebra.euclidean_distance(a: ArrayLike, b: ArrayLike) NDArrayFloat[source]#

Calculate the Euclidean distance between the specified point arrays \(a\) and \(b\).

For a two-dimensional space, the metric is as follows:

\(E_D = [(x_a - x_b)^2 + (y_a - y_b)^2]^{1/2}\)

Parameters:
Returns:

Euclidean distance between the two point arrays.

Return type:

numpy.float64 or numpy.ndarray

Examples

>>> a = np.array([100.00000000, 21.57210357, 272.22819350])
>>> b = np.array([100.00000000, 426.67945353, 72.39590835])
>>> euclidean_distance(a, b)
451.7133019...