User:Furion: Difference between revisions
Jump to navigation
Jump to search
m fix |
m fix again |
||
| Line 16: | Line 16: | ||
More stuff coming soon :> | More stuff coming soon :> | ||
[[Category:ETPro:Mods]] | [[Category:ETPro:Mods]] | ||
Revision as of 20:45, 9 February 2007
Hello There ;p
dist() Function
For distance between two object with vec3 position values
function dist(a ,b) ax,ay,az = a[1],a[2],a[3] bx,by,bz = b[1],b[2],b[3] dx = math.abs(bx - ax) dy = math.abs(by - ay) dz = math.abs(bz - az) d = math.sqrt((dx ^ 2) + (dy ^ 2) + (dz ^ 2)) return math.floor(d) / 39.37 end
More stuff coming soon :>