diff --git a/javascript/qrcodegen.js b/javascript/qrcodegen.js index 503e5ec..043c2d0 100644 --- a/javascript/qrcodegen.js +++ b/javascript/qrcodegen.js @@ -693,7 +693,7 @@ var qrcodegen = new function() { if (degree < 1 || degree > 255) throw "Degree out of range"; // Polynomial coefficients are stored from highest to lowest power, excluding the leading term which is always 1. - // For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the uint8 array {255, 8, 93}. + // For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the uint8 array [255, 8, 93]. var result = []; for (var i = 0; i < degree - 1; i++) result.push(0); diff --git a/python/qrcodegen.py b/python/qrcodegen.py index e1e8fff..69e0c0a 100644 --- a/python/qrcodegen.py +++ b/python/qrcodegen.py @@ -570,7 +570,7 @@ class QrCode(object): if degree < 1 or degree > 255: raise ValueError("Degree out of range") # Polynomial coefficients are stored from highest to lowest power, excluding the leading term which is always 1. - # For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the uint8 array {255, 8, 93}. + # For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the uint8 array [255, 8, 93]. result = [0] * (degree - 1) + [1] # Start off with the monomial x^0 # Compute the product polynomial (x - r^0) * (x - r^1) * (x - r^2) * ... * (x - r^{degree-1}), diff --git a/rust/src/lib.rs b/rust/src/lib.rs index d71a979..4a2748a 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -778,7 +778,7 @@ impl QrCode { fn reed_solomon_compute_divisor(degree: usize) -> Vec { assert!(1 <= degree && degree <= 255, "Degree out of range"); // Polynomial coefficients are stored from highest to lowest power, excluding the leading term which is always 1. - // For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the uint8 array {255, 8, 93}. + // For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the uint8 array [255, 8, 93]. let mut result = vec![0u8; degree - 1]; result.push(1); // Start off with the monomial x^0 diff --git a/typescript/qrcodegen.ts b/typescript/qrcodegen.ts index f43e85e..c77f9b4 100644 --- a/typescript/qrcodegen.ts +++ b/typescript/qrcodegen.ts @@ -639,7 +639,7 @@ namespace qrcodegen { if (degree < 1 || degree > 255) throw "Degree out of range"; // Polynomial coefficients are stored from highest to lowest power, excluding the leading term which is always 1. - // For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the uint8 array {255, 8, 93}. + // For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the uint8 array [255, 8, 93]. let result: Array = []; for (let i = 0; i < degree - 1; i++) result.push(0);