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
- 344 Game & application design
- 304 Plugins
- 69 User experience
- 74 Marketplace
- 286 Code snippets
- 33 Building a team?
- 265 Suggestions & requests
- 350 Announce your apps made with Gideros.
- 90 Step by step tutorials
- 635 Bugs and issues
- 195 Introduce yourself
- 215 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