Here you can find the source of clampTo_0_255(int i)
public static int clampTo_0_255(int i)
//package com.java2s; public class Main { public static int clampTo_0_255(int i) { return i > 255 ? 255 : (i < 0 ? 0 : i); }//from w w w. j av a 2s . c o m }