colour.algebra.smoothstep_function¶
- colour.algebra.smoothstep_function(x, a=0, b=1, clip=False)[source]¶
Evaluates the smoothstep sigmoid-like function on array \(x\).
- Parameters
x (numeric or array_like) – Array \(x\).
a (numeric, optional) – Low input domain limit, i.e. the left edge.
b (numeric, optional) – High input domain limit, i.e. the right edge.
clip (bool, optional) – Whether to scale, bias and clip input values to domain [0, 1].
- Returns
Array \(x\) after smoothstep sigmoid-like function evaluation.
- Return type
array_like
Examples
>>> x = np.linspace(-2, 2, 5) >>> smoothstep_function(x, -2, 2, clip=True) array([ 0. , 0.15625, 0.5 , 0.84375, 1. ])