daily pastebin goal
42%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.      * Função que formata Double para duas casas após virgula
  3.      * @param d - double atual
  4.    * @param scale - numero de casas após a virgula
  5.      * @return Retorna um Double com o número de casas passado como parametro
  6.    */
  7. public static double roudingDouble(double d, int scale){
  8.    Double bd = new BigDecimal(d).setScale(scale, RoundingMode.HALF_EVEN);
  9.    return bd.doubleValue();
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top