docs: static public GrayS8 discretizeDirection4(GrayF32 angle , GrayS8 discrete )
  	{
  		discrete = InputSanityCheck.checkDeclare(angle,discrete,GrayS8.class);
  
  		final float A = (float)(Math.PI/8.0);
  		final float B = (float)(Math.PI/4.0);
  		final int w = angle.width;
  		final int h = angle.height;
  
  		for( int y = 0; y < h; y++ ) {
  			int indexSrc = angle.startIndex + y*angle.stride;
  			int indexDst = discrete.startIndex + y*discrete.stride;
  
  			int end = indexSrc + w;
  			for( ; indexSrc < end; indexSrc++ , indexDst++ ) {
  				float a = angle.data[indexSrc];
  				int val;
  				if( a >= 0 ) {
  					val = (int)((a+A)/B);
  				} else {
  					val = (int)((a-A)/B);
  				}
  				discrete.data[indexDst] = (byte)(val == -2 ? 2 : val);
  			}
  		}
  
  		return discrete;
  	}