* @param places Places after the separator
* @return Rounded number as a string
* @throws NaNException Gets thrown if the input string is no number at all
*/
private static String round(double number, int places) throws NaNException{
if(Double.isNaN(number)) throw new NaNException();
else if(Double.isInfinite(number)) throw new NaNException(); //return ""+number;
if(places == 0)
return (int)Math.round(number)+"";
String s = ((Math.round(number*Math.pow(10, places))))/Math.pow(10, places)+"";
if(s.contains(".") && s.indexOf(".")+places+1 < s.length())
s = s.substring(0, s.indexOf(".")+1+places);