BIS fnc distance2D: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(populated the page)
m (Cleaning)
Line 1: Line 1:
{{Function|= Comments
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________
Line 8: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Arma 2 version of [[distance2D]].<br />
| {{arma2}} version of [[distance2D]]. Use [[distance2D]] instead if available as {{arma3}}'s BIS_fnc_distance2D uses [[distance2D]] internally anyway. |= Description
Use [[distance2D]] instead if available as Arma 3's BIS_fnc_distance2D uses [[distance2D]] internally anyway<br />
____________________________________________________________________________________________
<pre>
/************************************************************
Distance 2D
 
Parameters: [object or position 1, object or position 2]
 
Returns the distance between the two objects or positions
"as the crow flies" (ignoring elevation)
Example: [player, getpos dude] call BIS_fnc_distance2D
************************************************************/


//return squared distance between _pos1 and _pos2
| [param1, param2] call [[BIS_fnc_distance2D]] |= Syntax
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________


| [param1, param2] call '''BIS_fnc_distance2D''' |= Syntax
|p1= param1: [[Object]] or [[Array]] in format [[Position]] or [[Position2D]] |= Parameter 1


|p1= param1: [[Object]] or [[Array]] in format [[Position]] or [[Position2D]]|= Parameter 1
|p2= param2: [[Object]] or [[Array]] in format [[Position]] or [[Position2D]] |= Parameter 2
|p2= param2: [[Object]] or [[Array]] in format [[Position]] or [[Position2D]]|= Parameter 2


| [[Number]] - Distance in meters or 1e10 if distance cannot be calculated |= Return value
| [[Number]] - Distance in meters or 1e10 if distance cannot be calculated |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code> [player, rescueHelicopter] call BIS_fnc_distance2D </code> |=  
|x1= <code><nowiki>[</nowiki>[[player]], rescueHelicopter] [[call]] [[BIS_fnc_distance2D]];</code> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[distance2D]] |= See also
| [[distance2D]], [[BIS_fnc_distance2Dsqr]] |= See also
 
}}
}}



Revision as of 10:12, 30 April 2018

Hover & click on the images for description

Description

Description:
Arma 2 version of distance2D. Use distance2D instead if available as Arma 3's BIS_fnc_distance2D uses distance2D internally anyway.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[param1, param2] call BIS_fnc_distance2D
Parameters:
param1: Object or Array in format Position or Position2D
param2: Object or Array in format Position or Position2D
Return Value:
Number - Distance in meters or 1e10 if distance cannot be calculated

Examples

Example 1:
[player, rescueHelicopter] call BIS_fnc_distance2D;

Additional Information

See also:
distance2DBIS_fnc_distance2Dsqr

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section