Skip to content

Commit

Permalink
Merge pull request #22 from anthonyryan1/master
Browse files Browse the repository at this point in the history
replace floor hack with Math.floor()
  • Loading branch information
neocotic committed Jun 25, 2014
2 parents 5967748 + d7e97f0 commit 6edb3e1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/qr.html
Original file line number Diff line number Diff line change
Expand Up @@ -2418,7 +2418,7 @@ <h2 id="qr-functions">QR functions</h2>

<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">var</span> px = size;
px /= width;
px = <span class="hljs-built_in">Math</span>.round(px - <span class="hljs-number">0.5</span>);</pre></div></div>
px = <span class="hljs-built_in">Math</span>.floor(px);</pre></div></div>

</li>

Expand Down
2 changes: 1 addition & 1 deletion qr.js
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@
// Determine the *pixel* size.
var px = size;
px /= width;
px = Math.round(px - 0.5);
px = Math.floor(px);

// Draw the QR code.
c2d.clearRect(0, 0, size, size);
Expand Down
Loading

0 comments on commit 6edb3e1

Please sign in to comment.