Talk:IsElementInRange

From Multi Theft Auto: Wiki
Revision as of 13:31, 4 August 2012 by Wielebny (talk | contribs) (alternative version)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Consider replacing it with

function isElementInRange(theElement, x,y,z,range)
 return getDistanceBetweenPoints3D(getElementPosition(target_element), x,y,z)<=range
end

Which is shorter, cleaner and probably faster. --Wielebny 13:31, 4 August 2012 (UTC)