Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/trunk/scripts/lua_extra_functions @ 4119

Last change on this file since 4119 was 3991, checked in by bensch, 18 years ago

data/trunk: merged the single_player_map branche back.
merged with command:
svn merge -r523:HEAD https://svn.orxonox.net/data/branches/single_player_map .

conflicts resolved in all sp_levels in favour of the branche

File size: 409 bytes
Line 
1!--------------- Copy this to the beginning of a lua script to use the functions ---------------!
2
3-- Initialises the random number generator
4randinit = false
5function randInit()
6
7if not randinit then
8math.randomseed(os.clock())
9randinit = true
10end
11
12end
13
14
15-- Returns the distance between (x1,x2,x3) and (y1,y2,y3)
16function dist( x1,x2,x3, y1,y2,y3 )
17
18return math.sqrt( (x1-y1)^2 + (x2-y2)^2 + (x3-y3)^2 )
19
20end
Note: See TracBrowser for help on using the repository browser.