Rounding a double down (even when the previous calculation results in < .5)
<p>I'm trying to round the number down despite the value after the decimal point. The purpose is then to subtract the rounded number from the full number to isolate the decimals as a new value. </p>

<pre><code>DecimalFormat decfom = new DecimalFormat("#.##");
String splitter1 = decfom.format(newdecihole);

DecimalFormat df = new DecimalFormat("##."); 
String splitter2 = df.format(newdecihole);
double split1 = Double.parseDouble(splitter1);
double split2 = Double.parseDouble(splitter2);

double splitdeci = split1 - split2;
double finfracti = splitdeci * 8;
</code></pre>

<p>What im trying to do is turn the result into whole numbers and 8ths. Everything ive tried works fine until I have a result that rounds up instead of down (which then gives splitdeci a negative value).</p>

<p>Ive tried making split 2 an int but it just rounds it up</p>
