public static int round ( int top , int div2 , int divisor ) { if ( top > 0 ) return ( top + div2 ) / divisor ; else return ( top - div2 ) / divisor ; }
Specialized rounding for use with integer wavelet transform .