{"name":"BIS_fnc_randomPosIntersection","operator":null,"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","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.82"}],"since":{"game":"arma3","name":"Arma 3","version":"1.82"},"arma3_since":"1.82","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"firstCircle","type":"Object, String or Array","optional":false,"default":null,"description":"first circle. Can be a trigger, a marker or an array in form\n- 0: Array - circleCenter\n  - 0: Number - coordinate X\n  - 1: Number - coordinate Y\n- 1: Number - radius","types":["Object","String","Array"],"since":null,"text":"firstCircle: Object, String or Array - first circle. Can be a trigger, a marker or an array in form\n- 0: Array - circleCenter\n  - 0: Number - coordinate X\n  - 1: Number - coordinate Y\n- 1: Number - radius"},{"name":"secondCircle","type":"Object, String or Array","optional":false,"default":null,"description":"second circle. Same as above.","types":["Object","String","Array"],"since":null,"text":"secondCircle: Object, String or Array - second circle. Same as above."},{"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","types":["Number"],"since":null,"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","types":["Number"],"since":null,"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","types":["Array"],"description":"2D Position","text":"Array - 2D Position"}}],"examples":[{"text":"```sqf\n[trigger1, trigger2, 0.75, 0.75] call BIS_fnc_randomPosIntersection;\n```","code":["[trigger1, trigger2, 0.75, 0.75] call BIS_fnc_randomPosIntersection;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":[],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Geometry","Function Group: Positions","Functions","Introduced with Arma 3 version 1.82"],"docblock":null,"filled_from_docblock":[]}