It looks like you're new here. If you want to get involved, click one of these buttons!

- 7.6K All Categories
- 10 Help with translations
- 4.2K General questions
- 106 Roadmap
- 345 Game & application design
- 306 Plugins
- 69 User experience
- 74 Marketplace
- 286 Code snippets
- 33 Building a team?
- 266 Suggestions & requests
- 350 Announce your apps made with Gideros.
- 90 Step by step tutorials
- 639 Bugs and issues
- 195 Introduce yourself
- 216 Announcements
- 103 Forum talk
- 399 Relax cafe

MikeHart
Guru

Hi folks,

this snipped will calculate the distance in pixel of two given vector coordinates:

this snipped will calculate the distance in pixel of two given vector coordinates:

local vecDist = function(x, y, tx, ty) --Calculate the distance between 2 vectors local xdiff = x - tx local ydiff = y - ty local dist = (xdiff*xdiff+ydiff*ydiff)^0.5 return dist end |

Likes: gorkem

+1 -1 (+1 / -0 )Share on Facebook

## Comments