Java Integer Create toInt(final Double value)

Here you can find the source of toInt(final Double value)

Description

to Int

License

Open Source License

Parameter

Parameter Description
double1 a parameter

Declaration

public static int toInt(final Double value) 

Method Source Code

//package com.java2s;

public class Main {
    /**//w ww .  j av a2  s .co  m
     * @param double1
     * @return
     */
    public static int toInt(final Double value) {
        return Integer.parseInt("" + ((long) Math.floor(value)));
    }
}

Related

  1. toInt(final byte[] bytes, final int offset)
  2. toInt(final byte[] bytes, final int offset)
  3. toInt(final byte[] data)
  4. toInt(final byte[] inputBytes, int offset)
  5. toInt(final byte[] pBytes)
  6. toInt(final double[] a, final int len)
  7. toInt(final int r, final int g, final int b)
  8. toInt(final long a)
  9. toInt(final long n)