[w3c/gamepad] Address potential division by zero during button and axis normalization (Issue #238)

gabrielsanbrito created an issue (w3c/gamepad#238)

The steps to normalize button and axis values can potentially divide by zero, introducing NaN values which will satisfy the gamepad comparison checks and always register as an input change (since NaN != NaN).

Possibly we can just ignore any input with bounds where max <= min; we don't expect to hit this case with real gamepads.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/issues/238
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/gamepad/issues/238@github.com>

Received on Wednesday, 28 October 2026 01:36:08 UTC