Java BigDecimal Trim truncByScale(BigDecimal value, int scale)

Here you can find the source of truncByScale(BigDecimal value, int scale)

Description

trunc By Scale

License

Apache License

Declaration

public static BigDecimal truncByScale(BigDecimal value, int scale) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.math.BigDecimal;

public class Main {
    public static BigDecimal truncByScale(BigDecimal value, int scale) {
        return value.setScale(scale, BigDecimal.ROUND_DOWN);
    }//from   w w w . j a v  a2  s . co  m
}

Related

  1. trim(BigDecimal n)
  2. trim(BigDecimal pNombre)
  3. trim(BigDecimal val)
  4. trimBigDecimal(BigDecimal n)
  5. truncateAmount(BigDecimal value)