Assign whatever value is smaller or larger to a variable in javascript
<p>I often find myself doing these sort of ternary constructs which seem to lack elegance:</p>

<pre><code>pixels = ( pixels &gt; (canvas.top + canvas.left) ) ? canvas.top + canvas.left : pixels;
</code></pre>

<p>Is there a more succinct way stating <code>pixels = whatever is smaller</code> </p>
