Implementing game controller axis dead zones

Analog game controllers (joysticks/joypads) report each axis as a value that changes linearly across its range. But typically games require an area in the centre to be considered 0. This flat spot is often called a 'dead zone', and is frequently obtained with an input adjustment curve as shown below.

hard limit graph

y = max(x - c, 0) / (1 - c)

However, the sudden transitition from constant to linear response is problematic when fine control is required near the transition. In my application I don't need such a hard limit near 0, but only a decrease in input sensitivity. Here are a family of curves that I think do a better job.

smooth curve graph

y = x * ((x * (1 + c)) / (x + c * sign(x)))^8

I think this is much more satisfying, giving a feeling of greater accuracy and control.

Just adjust c to pick the width of the axis centre (the dead zone, although it's not truly 0, so that's not such a good name for it). The graph above uses the following values for c to get the even spacing.

0.003472
0.007458
0.01195
0.01698
0.02258
0.0288
0.03571
0.04338
0.05191
0.06141
0.07201
0.08388
0.09721
0.1122
0.1292
0.1486