BIS fnc randomPosIntersection: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...)
Line 5: Line 5:
|version1= 1.82
|version1= 1.82


|gr1= Positions |GROUP1=
|gr1= Positions


|gr2= Geometry |GROUP2=
|gr2= Geometry


<!--|exec= server|=-->
<!--|exec= server|=-->

Revision as of 23:38, 17 January 2021

Hover & click on the images for description

Description

Description:
Returns random 2D position inside the intersection of two circles. [-1,-1] is returned if the circles do not intersect.
Execution:
call
Groups:
PositionsGeometry

Syntax

Syntax:
[firstCircle, secondCircle, positioning1, positioning2] call BIS_fnc_randomPosIntersection
Parameters:
firstCircle: Object, String or Array - First circle. Can be a trigger, a marker or an array in form
secondCircle: Object, String or Array - Second circle. Same as above.
positioning1: Number - (Optional, default -1) If a value between 0 and 1 is passed (0 and 1 included), then a gaussian distribution is used. This will influence the random position along the axis which connects the two circles' centers. A lower value means the position will be close to the first circle
positioning2: Number - (Optional, default -1) If a value between 0 and 1 is passed (0 and 1 included), then a gaussian distribution is used. This will influence the random position along the axis perpendicular to the axis which connects the two circles' centers.
Return Value:
Array - 2D Position

Examples

Example 1:
[trigger1,trigger2,0.75,0.75] call BIS_fnc_randomPosIntersection;

Additional Information

See also:
See also needed

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