icon location question [closed]

asked 2019-10-15 13:13:44 -0500

Hey All, I would like to know if it is possible to detect whether an object/icon is closer to point A or point B on a 2D surface? The object or icon is not moving. so just static. And if so, is it also possible to detect whether an object or icon is closer to point A to point J? (points A to J are in a straight line, like a scale)

At this point i am not looking for information how this is to be done, i just hope to find out that it is possible (or not).

edit retag flag offensive reopen merge delete

Closed for the following reason not a real question by berak
close date 2019-10-15 13:29:25.872345

Comments

distance between two point can be calculated using the Euclidean distance.

Note that this works in any dimensions! A good thing to add to your toolset.

holger gravatar imageholger ( 2019-10-15 15:24:29 -0500 )edit

yea, plain maths problem

berak gravatar imageberak ( 2019-10-16 00:41:03 -0500 )edit

As a PE teacher i don't know much about coding, but from your answers i can understand it is possible. So i would like to say thank you!

Mattijs gravatar imageMattijs ( 2019-10-16 01:33:14 -0500 )edit