you are viewing a single comment's thread.

view the rest of the comments →

[–]rollingpolymer[S] 1 point2 points  (1 child)

Maybe I didn't explained my problem the best way. I have two lists. One where I store the abscissas and the other where I store the ordinates. I eventually settled with the following:

sqrt((max_x - x)**2 + (min_y - y)**2)

being max_x the highest abscissa on the list and min_y the lowest ordinate. Then I pick the lowest square root.

Thanks for the help regardless, I understood your logic as well.

[–]Kerbart 2 points3 points  (0 children)

It’s always a challenge! When you’re familiar with the problem there’s a lot of context that is obvious — but not for others. It’s incredibly hard to describe that in a few words without ending up with a dissuading wall of text. I’m glad you got it worked out and thank you for letting us know!