com.google.zxing.pdf417.detector.Detector.round(float)

Here are the examples of the csharp api class com.google.zxing.pdf417.detector.Detector.round(float) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

Project: ZXing-CSharp
Source File: Detector.cs
View license
private static int computeDimension(ResultPoint topLeft, ResultPoint topRight, ResultPoint bottomLeft, ResultPoint bottomRight, float moduleWidth)
		{
			int topRowDimension = round(ResultPoint.distance(topLeft, topRight) / moduleWidth);
			int bottomRowDimension = round(ResultPoint.distance(bottomLeft, bottomRight) / moduleWidth);
			return ((((topRowDimension + bottomRowDimension) >> 1) + 8) / 17) * 17;
			/*
			* int topRowDimension = round(ResultPoint.distance(topLeft,
			* topRight)); //moduleWidth); int bottomRowDimension =
			* round(ResultPoint.distance(bottomLeft, bottomRight)); //
			* moduleWidth); int dimension = ((topRowDimension + bottomRowDimension)
			* >> 1); // Round up to nearest 17 modules i.e. there are 17 modules per
			* codeword //int dimension = ((((topRowDimension + bottomRowDimension) >>
			* 1) + 8) / 17) * 17; return dimension;
			*/
		}