mirror of
https://gitee.com/openharmony/third_party_qrcodegen
synced 2025-02-19 08:40:29 +00:00
Tweaked TypeScript code to correspond with other implementations for ease of auditing, without changing behavior.
This commit is contained in:
parent
764749bd8a
commit
87db45ef9c
@ -545,7 +545,7 @@ namespace qrcodegen {
|
||||
else {
|
||||
const numAlign: int = Math.floor(this.version / 7) + 2;
|
||||
const step: int = (this.version == 32) ? 26 :
|
||||
Math.ceil((this.size - 13) / (numAlign * 2 - 2)) * 2;
|
||||
Math.ceil((this.version * 4 + 4) / (numAlign * 2 - 2)) * 2;
|
||||
let result: Array<int> = [6];
|
||||
for (let pos = this.size - 7; result.length < numAlign; pos -= step)
|
||||
result.splice(1, 0, pos);
|
||||
|
Loading…
x
Reference in New Issue
Block a user