private int delta_clip(int i, int min, int max) {
		if(i<min) return min;
		else if(i>max) return max;
		else return i;
	}
private int delta_clip(int i, int min, int max) {
		if(i<min) return min;
		else if(i>max) return max;
		else return i;
	}
private int delta_clip ( int i , int min , int max ) { if ( i < min ) return min ; else if ( i > max ) return max ; else return i ; }
/* limits the value i to the range [min,max]
/ * limits the value i to the range [ min max ]