#include <cafe/pad.h> void PADClamp(PADStatus* status);
Clamps the input from the analog sticks. The
PADClamp function takes an array of
PADStatus type as an argument. The number of elements in this array is determined by
PAD_MAX_CONTROLLERS. This function clamps all
PADStatus objects at once.
Clamping Algorithm (analog sticks):
PADClamp performs dead-zone and outer-octagon clamping for analog sticks as illustrated below. For the Control Stick, the function first clamps dead zones along both axes (±15), and then it clamps the outside of the octagon whose lengths from the center to its 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).
Clamping Algorithm (analog trigger):
PADClamp clamps the dead zone and outer zone of the analog trigger. The dead zone from 0 to 30 and the external zone from 180-255 are clamped. The trigger return value is between 0 and 150.
|Background||Do not call this function from the background.|
|Production code||Do not call this function in production code. It is available only for debugging purposes.|
2013-05-08 Automated cleanup pass.
2012-08-21 Cleanup Pass
2011-02-03 Initial version.