pan> <span style="white-space:nowrap">max:<span class="type">Float</span></span>):<span class="type">Float</span></code></p></h3><div class="doc"><p><code>clamp</code> restricts a value within the specified range.</p>
<pre><code class="prettyprint haxe">trace(1.3.clamp(0, 1)); // prints 1
trace(0.8.clamp(0, 1)); // prints 0.8
trace(-0.5.clamp(0, 1)); // prints 0.0</code></pre></div></div><div class="field "><a name="clampSym"></a><h3><p><code><span class="label">static</span><span class="label">inline</span