Calculate distance
BlitzMax Forums/BlitzMax Beginners Area/Calculate distance
| ||
Hello, I need to detect my mouse pointer(mx,my) is nearby a line let's say from (x1,y1) to (x2,y2) I suppose it can be done like this: a) Given mx (x1<mx<x2) as mouse coordinate calculate line's y b) if abs(y-my) < distance then mouse is nearby line Is there any better way? Thanks! |
| ||
Thanks to Fredborg for the IsOnLine function (direct conversion from B3D) |
| ||
yowzer! |
| ||
Thanks for the code. Thats what I was looking for! I will use this code in BMax with bbLine (SDK) Grey: Can you please what "yowzer" means. Its a great moment to learn English idioms :) |
| ||
Yowzer is similar to wow! Nothing special. :) |
| ||
yowzer! Thanks TaskMaster |
| ||
Yeah a bit like Cor Blimey! Althought that's a bit old now. |
| ||
Yeah a bit like Cor Blimey! Althought that's a bit old now. And limited to people like Chaz & Dave and Dick Van Dyk :) |
| ||
i read some where that the parabolic distance is way faster to calculate then the traditional manhatan distance.. gone see if i find that article again //Gnasher |