Skip to content

@modoki/engine / index / clampAxes

Function: clampAxes()

clampAxes(frame): void

Clamp every analog axis into [−1, +1]. Sources ADD their contribution (e.g. a keyboard and a gamepad both pushing right), so the merged frame can briefly exceed unit range; this normalizes it before consumers read it.

Parameters

frame

InputFrame

Returns

void

Built with Modoki.