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      </table> </div>
35<h2>Description</h2>
36    <div class="section">
37<p>Enumerated type that indicates the analog stick clamp modes that are set by <a href="../../../../nn/hid/CTR/PadReader/SetStickClampMode.html"><CODE>SetStickClampMode</CODE></a>.</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 analog stick'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 analog stick'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')</CODE> = <CODE>(max - min) / d * (x,' y')</CODE></p><!-- write here --></div>
38<h2>Revision History</h2>
39    <div class="section">
40      <dl class="history">
41        <dt>2010/01/07</dt>
42<dd>Initial version.<br />
43        </dd>
44      </dl>
45    </div>
46  <hr><p>CONFIDENTIAL</p></body>
47</html>