neocotic / qrious

Pure JavaScript library for QR code generation using canvas
https://neocotic.com/qrious
Other
1.55k stars 215 forks source link

replace floor hack with Math.floor() #22

Closed anthonyryan1 closed 10 years ago

anthonyryan1 commented 10 years ago

Rounding a value - 0.5 is a common hack to work around the lack of a floor function. Since Math.floor() exists, this can be replaced.

I just noticed this while reading the code to look into a different issue.

neocotic commented 10 years ago

Good spot! Thanks for contributing :smile:

Do you want to also add yourself to AUTHORS.md? Optional, but I'll hold off merging if you do.

anthonyryan1 commented 10 years ago

I personally feel it's trivial enough to skip adding me. I'll make a note of using that in the future if I contribute in a more significant way.

neocotic commented 10 years ago

No problem. Merged. Since it's a trivial change, as you pointed out, I'll simply queue this for the next release, whenever that may be.