Before you comment, yes i have checked other questions aswell... like this article, or this one, or maybe even this one. However, i couldn't find how to set the point of origin. So, let's say i have an array picture X coords and picture Y coords
(on a grid of 100*100) x /y 92/81 82/47 81/03
Now i have the mouseX and mouseY. Does anyone know how to make a function that gives you the closest point x and y values in JavaScript?
Thanks in advance!
See Question&Answers more detail:os