---
name: "BIS_fnc_randomPosIntersection"
type: function
status: ok
groups: ["Positions", "Geometry"]
arma3_since: "1.82"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_randomPosIntersection
revid: 349156
updated: 2023-11-08T14:49:50Z
---

# BIS_fnc_randomPosIntersection

*Function · Positions, Geometry · Arma 3 v1.82*

## Description

Returns random 2D position inside the intersection of two circles. [-1,-1] is returned if the circles do not intersect.

## Syntax

```sqf
[firstCircle, secondCircle, positioning1, positioning2] call BIS_fnc_randomPosIntersection
```

**Parameters:**

- `firstCircle`: [Object](../topics/Object.md), [String](../topics/String.md) or [Array](../topics/Array.md) - first circle. Can be a trigger, a marker or an array in form
  - 0: [Array](../topics/Array.md) - circleCenter
    - 0: [Number](../topics/Number.md) - coordinate X
    - 1: [Number](../topics/Number.md) - coordinate Y
  - 1: [Number](../topics/Number.md) - radius
- `secondCircle`: [Object](../topics/Object.md), [String](../topics/String.md) or [Array](../topics/Array.md) - second circle. Same as above.
- `positioning1`: [Number](../topics/Number.md) - (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](../topics/Number.md) - (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:** [Array](../topics/Array.md) - 2D Position

## Examples

### Example 1

```sqf
[trigger1, trigger2, 0.75, 0.75] call BIS_fnc_randomPosIntersection;
```

<sub>Source: [BI Community Wiki — BIS fnc randomPosIntersection](https://community.bistudio.com/wiki/BIS_fnc_randomPosIntersection) (revision 349156).</sub>
