Scripting/Server/Functions/GetDistance
Straight-line distance between two Vectors.
Syntax
GetDistance(a, b)Arguments
- any a
- float b
Returns
float
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "getdistance" )
{
local result = GetDistance( 0, 0 );
MessagePlayer( "GetDistance returned: " + result, player );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
Section: Maths and strings
Categories: Server functions | Maths and strings