BIS fnc distance2Dsqr: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " {{Function|Comments=" to "{{Function|Comments=")
m (Some wiki formatting)
 
(32 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function
____________________________________________________________________________________________


| arma2 |Game name=
|game1= arma2
|version1= 1.00


|1.00|Game version=
|game2= arma2oa
____________________________________________________________________________________________
|version2= 1.50


|  
|game3= tkoh
Returns the SQUARE of the distance between the two objects or
|version3= 1.00
positions "as the crow flies" (ignoring elevation).


{{Feature arma3|This function became obsolete with the introduction of [[distanceSqr]]}}
|game4= arma3
|version4= 0.50


|DESCRIPTION=
|gr1= Geometry
____________________________________________________________________________________________


|[Point_1,Point_2] call '''BIS_fnc_distance2Dsqr''';|SYNTAX=
|descr= Returns the SQUARE of the distance between the two objects or positions "as the crow flies" (ignoring elevation).


|p1=Point_1: [[Object]] or [[Position]] |PARAMETER1=
{{Feature|arma3|This function became obsolete with the introduction of [[distanceSqr]].}}
|p2=Point_2: [[Object]] or [[Position]] |PARAMETER2=


|[[Number]] - Squared distance |RETURNVALUE=
|s1= [pointA, pointB] call [[BIS_fnc_distance2Dsqr]]
____________________________________________________________________________________________


|x1= <code>[ [[player]], soldier_1 ] [[call]] '''BIS_fnc_distance2Dsqr'''</code> |Example1=
|p1= pointA: [[Object]] or [[Position]]


|x2= <code>[ [100,100,0],[0,0,0] ] [[call]] '''BIS_fnc_distance2Dsqr'''</code> |=
|p2= pointB: [[Object]] or [[Position]]
____________________________________________________________________________________________


|[[BIS_fnc_distance2D]], [[distance2D]], [[distance]] |SEEALSO=
|r1= [[Number]] - squared distance


}}
|x1= <sqf>[player, soldier_1] call BIS_fnc_distance2Dsqr;</sqf>


<h3 style="display:none">Notes</h3>
|x2= <sqf>[[100,100,0], [0,0,0]] call BIS_fnc_distance2Dsqr;</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|seealso= [[BIS_fnc_distance2D]] [[distance2D]] [[distance]]
</dl>
}}
 
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Geometry|{{uc:distance2Dsqr}}]]
[[Category:Functions|{{uc:distance2Dsqr}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:distance2Dsqr}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:distance2Dsqr}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:distance2Dsqr}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:distance2Dsqr}}]]

Latest revision as of 09:53, 8 November 2023

Hover & click on the images for description

Description

Description:
Returns the SQUARE of the distance between the two objects or positions "as the crow flies" (ignoring elevation).
Arma 3
This function became obsolete with the introduction of distanceSqr.
Execution:
call
Groups:
Geometry

Syntax

Syntax:
[pointA, pointB] call BIS_fnc_distance2Dsqr
Parameters:
pointA: Object or Position
pointB: Object or Position
Return Value:
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;

Additional Information

See also:
BIS_fnc_distance2D distance2D distance

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