saronson
2019-12-10 20:39:19
@saronson has joined the channel
wanderley.guimaraes
2019-12-11 01:02:33
The second part of Day 10 gave me a lot of work to get done. :grinning: I tried to apply the design recipe and I am really satisfied with the result.
ben
2019-12-11 02:41:25
today was very bad for me — I think because I was rushing
wanderley.guimaraes
2019-12-11 03:25:09
I struggled with the logic to sort the points. I bet there is a simpler way to sort the points that is not a combination of quadrant, slope and distance.
wanderley.guimaraes
2019-12-11 03:25:17
What were your mistakes?
sorawee
2019-12-11 06:06:36
@wanderley.guimaraes use atan
and gcd
!
wanderley.guimaraes
2019-12-11 07:10:20
I tried to use atan but I gave up. I don’t see how to apply gcd in this problem but I think again about the problem. Thanks for the hints!
wanderley.guimaraes
2019-12-11 07:11:50
Ow!
wanderley.guimaraes
2019-12-11 07:13:02
gcd will tell how many integers points in a segment! That is cleaver and will remove my nested loop.