evdev.curve

evdev

curve(v, kind, amount) -> shaped

Shape a normalized axis value

kind = "expo" softens the centre and keeps the ends: (1 - amount) * v + amount * v³. amount runs from 0, linear, to 1, cubic, and defaults to 0.5. The sign is kept. Any other kind returns v.