Java Integer Clip clip(int val, int from, int to)

Here you can find the source of clip(int val, int from, int to)

Description

clip

License

BSD License

Declaration

public static final int clip(int val, int from, int to) 

Method Source Code

//package com.java2s;
/**/*from w w w.  j a  v  a 2s .c om*/
 * This class is part of JCodec ( www.jcodec.org ) This software is distributed
 * under FreeBSD License
 * 
 * @author The JCodec project
 * 
 */

public class Main {
    public static final int clip(int val, int from, int to) {
        return val < from ? from : (val > to ? to : val);
    }
}

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 x)
  6. clip(int[][][] data, int startX, int startY, int stopX, int stopY)
  7. clipColor(final int compIn, final boolean allowRGB555)