1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../../../../css/manpage.css" type="text/css" /> 7<title>StickClampMode</title> 8 </head> 9 <body> 10<h1><CODE><a href="../../../../nn/Overview.html">nn</a>::<a href="../../../../nn/hid/Overview.html">hid</a>::<a href="../../../../nn/hid/CTR/Overview.html">CTR</a>::<a href="../../../../nn/hid/CTR/PadReader/Overview.html">PadReader</a>::StickClampMode</CODE> Enumerated Type</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14enum StickClampMode; 15</pre> 16 </div> 17<h2>Values</h2> 18 <div class="section"> 19 <table class="arguments"> 20 <thead> 21 <tr> 22<th>Value</th> 23<td>Description</td> 24 </tr> 25 </thead> 26 <tr> 27<th><CODE>STICK_CLAMP_MODE_CIRCLE</CODE></th> 28<td>Circular clamping. For more details, see the explanation further down on this page.</td> 29 </tr> 30 <tr> 31<th><CODE>STICK_CLAMP_MODE_CROSS</CODE></th> 32<td>Cross-shaped clamping. For more details, see the explanation further down on this page.</td> 33 </tr> 34 <tr> 35<th><CODE>STICK_CLAMP_MODE_MINIMUM</CODE></th> 36<td>Minimal clamping. For more details, see the explanation further down on this page.</td> 37 </tr> 38 </table> </div> 39<h2>Description</h2> 40 <div class="section"> 41<p>Enumerated type that indicates the Circle Pad clamp mode set by the <a href="../../../../nn/hid/CTR/PadReader/SetStickClampMode.html"><CODE>SetStickClampMode</CODE></a> function.</p><p>• <CODE>STICK_CLAMP_MODE_CIRCLE</CODE> (Circular Clamping)<br /><br />Clamps the inner and outer edges in a circle.<br />Given <SPAN class="argument">min</SPAN> and <SPAN class="argument">max</SPAN> as the minimum and maximum clamping values set by the <a href="../../../../nn/hid/CTR/PadReader/SetStickClamp.html"><CODE>SetStickClamp</CODE></a> function, the clamped coordinates <CODE>(x', y')</CODE> are obtained as follows according to the distance <CODE>d</CODE> from the origin to the Circle Pad input coordinates <CODE>(x, y)</CODE>. <br />If <CODE>d <= min</CODE>, <CODE>(x', y')</CODE> is equal to <CODE>(0, 0)</CODE>.<br />If <CODE>min < d < max</CODE>, <CODE>(x', y')</CODE> is equal to <CODE>(d - min) / d * (x, y)</CODE>.<br />If <CODE>d >= max</CODE>, <CODE>(x', y')</CODE> is equal to <CODE>(max - min) / d * (x, y)</CODE>.<br /><br />• <CODE>STICK_CLAMP_MODE_CROSS</CODE> (Cross-Shaped Clamping)<br /><br />Clamps the inner edge in a cross and the outer edge in a circle. First, <CODE>x</CODE> and <CODE>y</CODE> from the Circle Pad input coordinates <CODE>(x, y)</CODE> are clamped independently as follows. <br />If <CODE>x < 0</CODE>, <CODE>x'</CODE> is equal to <CODE>x + min</CODE> (always less than zero).<br />If <CODE>x >= 0</CODE>, <CODE>x'</CODE> is equal to <CODE>x - min</CODE> (always greater than zero).<br />If the distance <CODE>d</CODE> from the origin to the coordinates <CODE>(x', y')</CODE> is greater than <CODE>max - min</CODE>, the clamped coordinates <CODE>(x', y')</CODE> are obtained as follows. <CODE>(x', y') = (max - min) / d * (x,' y')</CODE><br /><br /> ・ <CODE>STICK_CLAMP_MODE_MINIMUM</CODE><br /> 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 <SPAN class="argument">max</SPAN> value set by the <CODE><a href="../../../../nn/hid/CTR/PadReader/SetStickClamp.html">SetStickClamp</a></CODE> function.</p><!-- write here --></div> 42<h2>Revision History</h2> 43 <div class="section"> 44 <dl class="history"> 45 <dt>2011/10/09</dt> 46<dd>Revised Japanese terminology for the Circle Pad.<br /> 47 </dd> 48 <dt>2010/01/07</dt> 49<dd>Initial version.<br /> 50 </dd> 51 </dl> 52 </div> 53 <hr><p>CONFIDENTIAL</p></body> 54</html>