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

- 7.3K All Categories
- 8 Help with translations
- 4K General questions
- 98 Roadmap
- 326 Game & application design
- 292 Plugins
- 65 User experience
- 69 Marketplace
- 275 Code snippets
- 33 Building a team?
- 247 Suggestions & requests
- 344 Announce your apps made with Gideros.
- 87 Step by step tutorials
- 610 Bugs and issues
- 178 Introduce yourself
- 190 Announcements
- 81 Forum talk
- 385 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