Files
Examples/SQF/3D%20Pythagorus.Altis/functions/fn_distance.sqf
2019-05-06 01:05:24 +01:00

23 lines
430 B
Plaintext

/**
* Function to calculate distance between 2 sets of coordinates
*
* Expects the first two args to be an array of coordinates (x, y, z)
* The third arg is expected to be a flag for 3D calculation
* If no flag is provided it is assumed 2D.
*
* @param {array} point a
* @param {array} point b
* @param [bool=false]
*/
params [
["_a", [0, 0, 0]],
["_b", [0, 0, 0]],
["_3D", false, [false]]
];
_x = "pp";
_x;