mirror of
https://github.com/status-im/QR-Code-generator.git
synced 2026-08-31 01:31:10 +00:00
Swapped {dy,dx} variables in commutative operations for clarity, in all languages.
This commit is contained in:
+2
-2
@@ -327,7 +327,7 @@ class QrCode(object):
|
||||
xx, yy = x + dx, y + dy
|
||||
if (0 <= xx < self._size) and (0 <= yy < self._size):
|
||||
# Chebyshev/infinity norm
|
||||
self._set_function_module(xx, yy, max(abs(dy), abs(dx)) not in (2, 4))
|
||||
self._set_function_module(xx, yy, max(abs(dx), abs(dy)) not in (2, 4))
|
||||
|
||||
|
||||
def _draw_alignment_pattern(self, x, y):
|
||||
@@ -335,7 +335,7 @@ class QrCode(object):
|
||||
at (x, y). All modules must be in bounds."""
|
||||
for dy in range(-2, 3):
|
||||
for dx in range(-2, 3):
|
||||
self._set_function_module(x + dx, y + dy, max(abs(dy), abs(dx)) != 1)
|
||||
self._set_function_module(x + dx, y + dy, max(abs(dx), abs(dy)) != 1)
|
||||
|
||||
|
||||
def _set_function_module(self, x, y, isblack):
|
||||
|
||||
Reference in New Issue
Block a user