Java: Max and Min in absolute value
<p>I'm looking for a method that given 2 floats A and B return the value (A or B) with lower absolute value.</p>

<p>Initially I tried </p>

<pre><code>Math.min(Math.abs(A),Math.abs(B)); 
</code></pre>

<p>but it is not correct because for example for (-9,-2) return +2 and the return value I'm looking for is -2.</p>

<p>Is there some native/built-in for that?</p>
