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>nn::hid::CTR::PadReader::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>STICK_CLAMP_MODE_CIRCLE</th>
28<td>Circular clamping. For more details, see the explanation further down on this page.</td>
29        </tr>
30        <tr>
31<th>STICK_CLAMP_MODE_CROSS</th>
32<td>Cross-shaped clamping. For more details, see the explanation further down on this page.</td>
33        </tr>
34        <tr>
35<th>STICK_CLAMP_MODE_MINIMUM</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 Slide 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 <CODE>min</CODE> and <CODE>max</CODE> as the minimum and maximum clamping values set by <a href="../../../../nn/hid/CTR/PadReader/SetStickClamp.html"><CODE>SetStickClamp</CODE></a>:<br />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's input coordinates <CODE>(x, y)</CODE>. <br />If <CODE>d &lt;= min</CODE>, <CODE>(x', y')</CODE> is equal to <CODE>(0, 0)</CODE>.<br />If <CODE>min &lt; d &lt; max</CODE>, <CODE>(x', y')</CODE> is equal to  <CODE>(d - min) / d * (x, y)</CODE>.<br />If <CODE>d &gt;= 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.<br /> First, <CODE>x</CODE> and <CODE>y</CODE> from the Circle Pad's input coordinates <CODE>(x, y)</CODE> are clamped independently as follows. <br />If <CODE>x &lt; 0</CODE>, <CODE>x'</CODE> is equal to <CODE>x + min</CODE> (always less than zero).<br />If <CODE>x &gt;= 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>SetStickClamp</CODE> function.</p><!-- write here --></div>
42<h2>Revision History</h2>
43    <div class="section">
44      <dl class="history">
45        <dt>2010/01/07</dt>
46<dd>Initial version.<br />
47        </dd>
48      </dl>
49    </div>
50  <hr><p>CONFIDENTIAL</p></body>
51</html>