VPADEnableStickCrossClamp

Syntax

#include <cafe/vpad.h>

void VPADEnableStickCrossClamp( s32 chan );

Parameters

chan Controller number. 0 for DRC1 and 1 for DRC2.

Return Values

None.

Description

For the DRC analog stick, switches the clamp processing method to cross clamping.

Clamps the inner edge in a cross and the outer edge in a circle.

Given min and max as the minimum and maximum clamping values set by the VPADSetLStickClampThreshold or VPADSetRStickClampThreshold 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 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').

Finally, (x', y') is normalized by max-min to floating-point values between -1.0f and 1.0f.

Call the VPADDisableStickCrossClamp function to change to circular clamping (default).

Do Not Call From

Background Do not call this function from the background.
Multiple threads This function is not thread-safe.
Multiple Cores Do not call this function from more than one Core.

See Also

VPADDisableStickCrossClamp

Revision History

2013/05/16 Added the description of cross clamp.
2013/05/08 Automated cleanup pass.
2011/04/15 Added argument.
2011/03/30 Initial version.


CONFIDENTIAL