Fixed the names of some methods in comments.

This commit is contained in:
Project Nayuki 2021-01-25 23:11:54 +00:00
parent 8cbd1f506a
commit f9d1172e29
2 changed files with 3 additions and 3 deletions

View File

@ -446,7 +446,7 @@ class QrCode:
def _apply_mask(self, mask: int) -> None:
"""XORs the codeword modules in this QR Code with the given mask pattern.
The function modules must be marked and the codeword bits must be drawn
before masking. Due to the arithmetic of XOR, calling applyMask() with
before masking. Due to the arithmetic of XOR, calling _apply_mask() with
the same mask value a second time will undo the mask. A final well-formed
QR Code needs exactly one (not zero, two, etc.) mask applied."""
if not (0 <= mask <= 7):
@ -644,7 +644,7 @@ class QrCode:
MIN_VERSION = 1 # The minimum version number supported in the QR Code Model 2 standard
MAX_VERSION = 40 # The maximum version number supported in the QR Code Model 2 standard
# For use in getPenaltyScore(), when evaluating which mask is best.
# For use in _get_penalty_score(), when evaluating which mask is best.
_PENALTY_N1 = 3
_PENALTY_N2 = 3
_PENALTY_N3 = 40

View File

@ -613,7 +613,7 @@ impl QrCode {
// XORs the codeword modules in this QR Code with the given mask pattern.
// The function modules must be marked and the codeword bits must be drawn
// before masking. Due to the arithmetic of XOR, calling applyMask() with
// before masking. Due to the arithmetic of XOR, calling apply_mask() with
// the same mask value a second time will undo the mask. A final well-formed
// QR Code needs exactly one (not zero, two, etc.) mask applied.
fn apply_mask(&mut self, mask: Mask) {