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

- 7.4K All Categories
- 8 Help with translations
- 4K General questions
- 98 Roadmap
- 330 Game & application design
- 294 Plugins
- 66 User experience
- 70 Marketplace
- 278 Code snippets
- 33 Building a team?
- 251 Suggestions & requests
- 345 Announce your apps made with Gideros.
- 88 Step by step tutorials
- 611 Bugs and issues
- 184 Introduce yourself
- 192 Announcements
- 85 Forum talk
- 387 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