#include <revolution/pad.h> void PADClamp(PADStatus* status);
| status | Array [PAD_MAX_CONTROLLERS] of PADStatus to be clamped. If the err member stores PAD_ERR_NONE, the analog stick input value is clamped according to the algorithm below. |
|---|
None.
Clamps the inputs of the controller analog stick inputs. The PADClamp function takes an array of PADStatus as an argument. The number of elements in this array is indicated by PAD_MAX_CONTROLLERS. This function clamps all the PADStatus data at once.
Clamping Algorithm (analog sticks): PADClamp performs dead-zone and outer-octagon clamping for analog sticks as illustrated below. For the Control Stick, this function first clamps dead zones along both axes (±15), and then it clamps along the outer octagon whose length from the center to vertices are 72 (x = 0 or y = 0) and 56.6 (x = ±y). For the C-Stick (substick), the function first clamps dead zones along both axes (±15), and then it clamps along the outside of the octagon whose lengths from the center to its vertices are 59 (x = 0 or y = 0) and 43.8 (x = ±y).

Clamp algorithm (analog trigger): PADClamp clamps the dead zone and outer zone of the analog trigger. The dead zone is clamped from 0 to 30 and the external zone is clamped from 180 to 255. The trigger return value is between 0 and 150.
2006/03/01 Initial version.
CONFIDENTIAL