Arma 3 Scripting

Function in Geometry

BIS_fnc_distance2Dsqr

Also available as Markdown and JSON, or read the original wiki page.

Warning

This function is deprecated. Use distanceSqr instead.

Description

Returns the SQUARE of the distance between the two objects or positions "as the crow flies" (ignoring elevation).

Note

This function became obsolete with the introduction of distanceSqr.

Syntax

[pointA, pointB] call BIS_fnc_distance2Dsqr

Parameters:

Returns: Number - squared distance

Examples

Example 1

[player, soldier_1] call BIS_fnc_distance2Dsqr;

Example 2

[[100,100,0], [0,0,0]] call BIS_fnc_distance2Dsqr;

See also

BIS_fnc_distance2D · distance2D · distance