{"name":"BIS_fnc_randomPosIntersection","title":"BIS fnc randomPosIntersection","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_randomPosIntersection","revid":349156,"updated":"2023-11-08T14:49:50Z","groups":["Positions","Geometry"],"status":"ok","games":{"arma3":"1.82"},"since":"arma3 1.82","arma3_since":"1.82","description":"Returns random 2D position inside the intersection of two circles. [-1,-1] is returned if the circles do not intersect.","syntaxes":[{"syntax":"[firstCircle, secondCircle, positioning1, positioning2] call BIS_fnc_randomPosIntersection","params":[{"name":"firstCircle","type":"Object, String or Array","description":"first circle. Can be a trigger, a marker or an array in form\n\n- 0: Array - circleCenter\n  - 0: Number - coordinate X\n  - 1: Number - coordinate Y\n- 1: Number - radius","type_expr":"Object | String | Array"},{"name":"secondCircle","type":"Object, String or Array","description":"second circle. Same as above.","type_expr":"Object | String | Array"},{"name":"positioning1","type":"Number","optional":true,"default":"-1","description":"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","type_expr":"Number","text":"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"},{"name":"positioning2","type":"Number","optional":true,"default":"-1","description":"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","type_expr":"Number","text":"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"}],"returns":{"type":"Array","type_expr":"Array","description":"2D Position"}}],"examples":[{"code":["[trigger1, trigger2, 0.75, 0.75] call BIS_fnc_randomPosIntersection;"]}]}