Skip to main content

trapezoidal

Function trapezoidal 

Source
pub fn trapezoidal(x: f64, a: f64, b: f64, c: f64, d: f64) -> f64
Expand description

Trapezoidal membership: 0 below a, rising on [a, b], plateau 1 on [b, c], falling on [c, d], 0 above d. Requires a <= b <= c <= d.