SabakiHQ / Sabaki

An elegant Go board and SGF editor for a more civilized age.
https://sabaki.yichuanshen.de/
MIT License
2.41k stars 377 forks source link

Issue 807 #825

Closed billhails closed 2 years ago

billhails commented 3 years ago

fix issue #807

Floating point rounding error because offsetHeight and offsetWidth are already rounded to integers.

billhails commented 3 years ago

Not sure how to loose those spurious extra commits in the history, I thought merging your repo master to my fork master then merging my master onto my branch would do it, but it just made it worse :grin: There's only one commit.

apetresc commented 3 years ago

No worries, I can squash them all together when merging :) Just going to attempt to reproduce this fix locally - assuming it works, I'm really really appreciative you sleuthed this down!

billhails commented 3 years ago

I can't take full credit, I showed the problem to some friends at work and one pointed me to the relevant code, his suggested fix (replace round with floor) wasn't quite right but it narrowed down my search considerably.

apetresc commented 2 years ago

Fully confirmed this fix works.

billhails commented 2 years ago

Cool