Esta función me resulto muy util para redonder cifras a dos decimales.

JAVA:
  1. public static float Roundd(float Rval, int Rpl) {
  2.           float p = (float)Math.pow(10,Rpl);
  3.           Rval = Rval * p;
  4.           float tmp = Math.round(Rval);
  5.           return (float)tmp/p;
  6.     }

Popularidad: 51%