nn::hid::CTR::PadReader::StickClampMode Enumerated Type

Syntax

enum StickClampMode;

Values

Value Description
STICK_CLAMP_MODE_CIRCLE Circular clamping. For more details, see the explanation further down on this page.
STICK_CLAMP_MODE_CROSS Cross-shaped clamping. For more details, see the explanation further down on this page.
STICK_CLAMP_MODE_MINIMUM Minimal clamping. For more details, see the explanation further down on this page.

Description

Enumerated type that indicates the Circle Pad clamp mode set by the SetStickClampMode function.

STICK_CLAMP_MODE_CIRCLE (Circular Clamping)

Clamps the inner and outer edges in a circle.
Given min and max as the minimum and maximum clamping values set by the SetStickClamp function, the clamped coordinates (x', y') are obtained as follows according to the distance d from the origin to the Circle Pad input coordinates (x, y).
If d <= min, (x', y') is equal to (0, 0).
If min < d < max, (x', y') is equal to (d - min) / d * (x, y).
If d >= max, (x', y') is equal to (max - min) / d * (x, y).

STICK_CLAMP_MODE_CROSS (Cross-Shaped Clamping)

Clamps the inner edge in a cross and the outer edge in a circle. First, x and y from the Circle Pad input coordinates (x, y) are clamped independently as follows.
If x < 0, x' is equal to x + min (always less than zero).
If x >= 0, x' is equal to x - min (always greater than zero).
If the distance d from the origin to the coordinates (x', y') is greater than max - min, the clamped coordinates (x', y') are obtained as follows. (x', y') = (max - min) / d * (x,' y')

STICK_CLAMP_MODE_MINIMUM
Minimizes inner clamping region. For the interior region, clamping is applied to the smaller of the areas derived by setting the lower limit values for circular clamping and cross-shaped clamping. The region shape is a circle with notches removed at the top, bottom, left, and right. The exterior region uses circular clamping, reflecting the max value set by the SetStickClamp function.

Revision History

2011/10/09
Revised Japanese terminology for the Circle Pad.
2010/01/07
Initial version.

CONFIDENTIAL