Class BigDecimal

java.lang.Object
com.codename1.util.BigDecimal

public class BigDecimal extends Object
Class representing a simple version of a big decimal. A BigDecimal is basically a BigInteger with a few digits on the right of the decimal point. The number of (binary) digits on the right of the decimal point is called the scale of the BigDecimal. Unlike in BigDecimal, the scale is not adjusted automatically, but must be set manually. All BigDecimals taking part in the same arithmetic operation must have equal scale. The result of a multiplication of two BigDecimals returns a BigDecimal with double scale.
  • Constructor Details

    • BigDecimal

      public BigDecimal(BigInteger bigInt, int scale)

      Constructor for BigDecimal. The value of the constructed BigDecimal equals bigInt / 10scale.

      Parameters
      • bigInt: The bigInt value parameter.

      • scale: The scale of the constructed BigDecimal.

  • Method Details