MCPcopy Create free account
hub / github.com/breck7/scroll / getAlignmentPatternPositions

Method getAlignmentPatternPositions

external/.qrcodegen.js:213–222  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

211 return o(0 <= s && s <= 9), (t += s * e.PENALTY_N4), o(0 <= t && t <= 2568888), t
212 }
213 getAlignmentPatternPositions() {
214 if (1 == this.version) return []
215 {
216 const t = Math.floor(this.version / 7) + 2,
217 e = 2 * Math.floor((8 * this.version + 3 * t + 5) / (4 * t - 4))
218 let r = [6]
219 for (let n = this.size - 7; r.length < t; n -= e) r.splice(1, 0, n)
220 return r
221 }
222 }
223 static getNumRawDataModules(t) {
224 if (t < e.MIN_VERSION || t > e.MAX_VERSION) throw new RangeError("Version number out of range")
225 let r = (16 * t + 128) * t + 64

Callers 1

drawFunctionPatternsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected