Java BigDecimal to toDouble(BigDecimal bigDecimal)

Here you can find the source of toDouble(BigDecimal bigDecimal)

Description

to Double

License

Apache License

Declaration

public static double toDouble(BigDecimal bigDecimal) 

Method Source Code


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

import java.math.BigDecimal;

public class Main {
    public static double toDouble(BigDecimal bigDecimal) {
        double result = 0.0;
        if (bigDecimal != null) {
            result = bigDecimal.doubleValue();
        }/*  w  w  w  .  j ava  2 s  .  com*/
        return result;
    }
}

Related

  1. convertToFen(BigDecimal num1)
  2. decimalToBytes(BigDecimal v, byte[] result, final int offset, int length)
  3. decimalToString(BigDecimal value)
  4. toBeforeDecimalPointString(BigDecimal bigDecimal)
  5. toDouble(BigDecimal b, boolean allownull)
  6. toDouble(final BigDecimal b)
  7. toDouble(final BigDecimal b)
  8. toInteger(BigDecimal b)
  9. toLong(BigDecimal value)