Thread: New Functions?
View Single Post
  #10  
Old 04-06-2005, 03:12 AM
Evil_Trunks Evil_Trunks is offline
Evil
Evil_Trunks's Avatar
Join Date: Dec 2004
Posts: 391
Evil_Trunks is on a distinguished road
Quote:
Originally Posted by jake13jake
What would be the best function Gscript could add, since I hate having to write it out every time, would be the distance formula!

((x1-x2)^2 + (y1-y2)^2)^(1/2)
this can get very ugly. I mean, right now you have all of these parenthesis and powers already, now the trouble comes when the variable names get bigger.
dist(x1,x2,y1,y2) or dist(x1,x2,y1,y2,z1,z2) would be nice... just more organized that way. I mean, there's already getangle and such, why not distance?
you could just make your own distance function like that
__________________

Reply With Quote