CBA_fnc_mapDirTo

Description

Gets the direction between two map grid references.

Parameters

_pos1Origin position array in format [Easting, Northing] [Array]
_pos2End position in format [Easting, Northing] [Array]

Returns

Direction from _pos1 to _pos2 [Number]

Examples

_dir = [[024,015], [025,014]] call CBA_fnc_mapDirTo;
// _dir will be 45 degrees
_dir = [["024","015"], ["025","014"]] call CBA_fnc_mapDirTo;
// _dir will be 45 degrees
_dir = ["024015", "025014"] call CBA_fnc_mapDirTo;
// _dir will be 45 degrees

Author

Nou (with credit to Headspace for the real math :p)

Close