Closed parkerbjur closed 2 years ago
@tieje hey, here is the change that I was talking about. passed all tests which have coverage.
Thanks for the documentation. All checks have passed. However, do you mind writing a test for the calculateCoordinates function since that's the one that was changed?
Ya, I can write a test for it. Do you want me to submit that as a separate PR or resubmit it all together?
All together is fine.
On Tue, Jul 19, 2022, 5:29 PM Parker Bjur @.***> wrote:
Ya, I can write a test for it. Do you want me to submit that as a separate PR or resubmit it all together?
— Reply to this email directly, view it on GitHub https://github.com/Hellenic/react-hexgrid/pull/89#issuecomment-1189569171, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEYP5FKPQORMHOG4KHA7WZ3VU4M2RANCNFSM54A7N7XA . You are receiving this because you were mentioned.Message ID: @.***>
per our discord discussion for record-keeping: "I'm going to accept your PR. When I last made my suggestion for testing, I didn't really know how testing occurred for Layout yet. It's just refactoring and getting the same output so if the current tests pass, then I think we're in the clear. Though the rewire package (https://github.com/jhnns/rewire) might be helpful for testing private functions. I guess you'll want to make a separate branch for it, if you want to implement testing. I'll put a post in dev discussions about potentially using rewire, since I've never used it."
I have refactored calculateCoordinates function to make it a bit simpler. I also added the ability to define an arbitrary rotation angle. Currently I just pass 0 rad or pi/6 rad to do the "flat" or "pointy" hexes.