Java Double Number Truncate truncate(final double value, final double min, final double max)

Here you can find the source of truncate(final double value, final double min, final double max)

Description

truncate

License

Open Source License

Declaration

public static double truncate(final double value, final double min,
            final double max) 

Method Source Code

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

public class Main {
    public static double truncate(final double value, final double min,
            final double max) {
        return Math.min(Math.max(value, min), max);
    }//from  w  w w . j av a 2s .co m
}

Related

  1. truncate(double value, int truncation)
  2. truncate(double x)
  3. truncate(double x)
  4. truncate(double x, double gran)
  5. truncate(double[] arr, int m)
  6. truncate(final double value, final double precision)
  7. truncate2decimals(double x)
  8. truncateDigits(double input, int numberDigits)
  9. truncateDigits(double[][] input, int numberDigits)