colour.utilities.lerp¶
-
colour.utilities.
lerp
(a, b, c)[source]¶ Performs a simple linear interpolation between given array \(a\) and array \(b\) using \(c\) value.
- Parameters
a (array_like) – Array \(a\), the start of the range in which to interpolate.
b (array_like) – Array \(b\), the end of the range in which to interpolate.
c (array_like) – Array \(c\) value to use to interpolate between array \(a\) and array \(b\).
- Returns
Linear interpolation result.
- Return type
ndarray
Examples
>>> a = 0 >>> b = 2 >>> lerp(a, b, 0.5) 1.0