fananek / hex-grid

HexGrid library provides easy and intuitive way of working with hexagonal grids.
MIT License
45 stars 8 forks source link

Hex Centre Point logic bug fix #6

Closed pmckeown closed 4 years ago

pmckeown commented 4 years ago

I've been using your library to build a SpriteKit game. Firstly, thanks heaps for implementing the hex math content that Red Blob Games have posted. I really appreciate it!

I have found a fixed a small bug with the calculation for determining the centre point of a cell. As I was laying out hexes onto a screen, I found that the centre point of each rendered hex was twice the value I expected. You can see from the attached files the difference in rendering.

I also took the opportunity to fix a few typos :)

Thanks again!

Before:

before

After:

after
fananek commented 4 years ago

Good catch, thanks for PR.

pmckeown commented 4 years ago

No worries!