𓁟 host1.bitchan.one

+⧖This is the future you chose. This is the future you chose.
𓀐 @c7=~nCsf: I've been programming 15+ years, I wouldn't be able to do this without googling. Traversing a linked list isn't the issue, it's that I don't really know the math required to determine if a point is on a line between two X,Y coordinates. I'd need sample data and sample output to validate whatever dogshit solution I come up with on my own.

Just think about it for a bit and it will be easy. Your first is to determine which two points the target lies between on the x axis. Your next step is to determine the y value of the line at the x value of the target. This is a linear interpolation between the two points of the line under test. Just figure out what portion of the x distance the target is along the line and multiple the difference between the y values of the two line points by that amount and add it to the smaller of the two. Then, check if target y is at, above, or below that value. That's basically it. C'mon man, you could have done that.

⧖expiring0/1 kept5d ago

𓀐 @gxQacNjL

⏱ 5d 👍 0

⬆ upvote 0