From 48da80e6d699834929f1d6fc76eb5da6f8976e83 Mon Sep 17 00:00:00 2001 From: srowen Date: Tue, 6 Dec 2011 19:05:22 +0000 Subject: [PATCH] Commit Issue 1038 for Bas git-svn-id: https://zxing.googlecode.com/svn/trunk@2067 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- .../core/src/com/google/zxing/qrcode/encoder/MaskUtil.as | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actionscript/core/src/com/google/zxing/qrcode/encoder/MaskUtil.as b/actionscript/core/src/com/google/zxing/qrcode/encoder/MaskUtil.as index e4f74a01c..d83bf123d 100644 --- a/actionscript/core/src/com/google/zxing/qrcode/encoder/MaskUtil.as +++ b/actionscript/core/src/com/google/zxing/qrcode/encoder/MaskUtil.as @@ -124,7 +124,7 @@ package com.google.zxing.qrcode.encoder } var numTotalCells:int = matrix.height() * matrix.width(); var darkRatio:Number = numDarkCells / numTotalCells; - return Math.abs(Math.round(darkRatio * 100 - 50)) / 5 * 10; + return int(Math.abs(int(darkRatio * 100 - 50)) / 5) * 10; } // Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask @@ -146,7 +146,7 @@ package com.google.zxing.qrcode.encoder case 3: return ((y + x) % 3 == 0) ? 1 : 0; case 4: - return (((y / 2) + (x / 3)) % 2 == 0) ? 1 : 0; + return ((int(y / 2) + int(x / 3)) % 2 == 0) ? 1 : 0; case 5: return (((y * x) % 2) + ((y * x) % 3) == 0) ? 1 : 0; case 6: