Here you can find the source of normalize(BigDecimal bigDecimal)
Parameter | Description |
---|---|
bigDecimal | a parameter |
public static BigDecimal normalize(BigDecimal bigDecimal)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; import java.math.RoundingMode; public class Main { public static final int STANDARD_SCALE = 2; public static final RoundingMode STANDARD_ROUNDING_MODE = RoundingMode.HALF_UP; /**/*from w w w. j av a2s .com*/ * Nastavi standardni zaokrouhlovani. * * @param bigDecimal */ public static BigDecimal normalize(BigDecimal bigDecimal) { return bigDecimal.setScale(STANDARD_SCALE, STANDARD_ROUNDING_MODE); } }