public double round(double d, int digits){ // wieso hat Java eigentlich keinen Potenz-Operator?? double factor = Math.pow(10, (double) digits); return (double) Math.round(d * factor) / factor;}