Java Integer Clip clipInt(int value, int max)

Here you can find the source of clipInt(int value, int max)

Description

clip Int

License

LGPL

Declaration

public static int clipInt(int value, int max) 

Method Source Code

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

public class Main {
    public static int clipInt(int value, int max) {
        return clipInt(value, 0, max);
    }/*from  w w  w  .  j  a  v a  2s .  c o  m*/

    public static int clipInt(int value, int min, int max) {
        return value > max ? max : value < min ? min : value;
    }
}

Related

  1. clip(int val, int from, int to)
  2. clip(int x)
  3. clip(int[][][] data, int startX, int startY, int stopX, int stopY)
  4. clipColor(final int compIn, final boolean allowRGB555)
  5. clipHistogram(final int[] hist, final int[] clippedHist, final int limit)
  6. clipInt(int value, int min, int max)
  7. clipPeerIdFromCurrentThreadName()
  8. clipPlus128(int v)
  9. clipRange(int value, int lowLimit, int highLimit)