Java Double Number Truncate truncateDoubleToInt(double p_76140_0_)

Here you can find the source of truncateDoubleToInt(double p_76140_0_)

Description

returns par0 cast as an int, and no greater than Integer.MAX_VALUE-1024

License

Open Source License

Declaration

public static int truncateDoubleToInt(double p_76140_0_) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**// ww w.j a  v a 2s. c  om
     * returns par0 cast as an int, and no greater than Integer.MAX_VALUE-1024
     */
    public static int truncateDoubleToInt(double p_76140_0_) {
        return (int) (p_76140_0_ + 1024.0D) - 1024;
    }
}

Related

  1. truncate2decimals(double x)
  2. truncateDigits(double input, int numberDigits)
  3. truncateDigits(double[][] input, int numberDigits)
  4. truncateDouble(final Double value)
  5. truncateDoubleDecimals(double x1, int num)
  6. truncateDoubleToInt(double x)
  7. truncateNaN(double[] values)
  8. truncateNoSciNotation(double d, int decimals)
  9. truncateRows(double[][] matrix, int nCols)