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

- 7.4K All Categories
- 9 Help with translations
- 4.1K General questions
- 101 Roadmap
- 335 Game & application design
- 296 Plugins
- 68 User experience
- 70 Marketplace
- 280 Code snippets
- 33 Building a team?
- 257 Suggestions & requests
- 347 Announce your apps made with Gideros.
- 89 Step by step tutorials
- 615 Bugs and issues
- 194 Introduce yourself
- 197 Announcements
- 91 Forum talk
- 392 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