question: private Double formatDoubleValue ( Double value , int places ) { BigDecimal bd = new BigDecimal ( value ) ; bd = bd . setScale ( places , RoundingMode . HALF_UP ) ; return bd . doubleValue ( ) ; }
target:  This function returns decimals value for a Double