Java Integer Clip clip(int x)

Here you can find the source of clip(int x)

Description

clip

License

Open Source License

Declaration

private static int clip(int x) 

Method Source Code

//package com.java2s;

public class Main {
    private static int clip(int x) {
        if (x < 0)
            return 0;

        if (x > 255)
            return 255;

        return x;
    }/*  w  w  w . j  av a 2s.co m*/
}

Related

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