BIS fnc randomPosIntersection: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Function|= Comments | arma3 |Game name= |1.82|Game version= <!---|arg= local |Multiplayer Arguments=---> <!---|eff= local |Multiplayer Effects=---> | <pre>/* Author: R...") |
Lou Montana (talk | contribs) m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *S([a-z ])" to "$1 - s$2") |
||
(20 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=function | ||
| arma3 | | |game1= arma3 | ||
|version1= 1.82 | |||
| | |gr1= Positions | ||
|gr2= Geometry | |||
|descr= Returns random 2D position inside the intersection of two circles. [-1,-1] is returned if the circles do not intersect. | |||
| | |s1= [firstCircle, secondCircle, positioning1, positioning2] call [[BIS_fnc_randomPosIntersection]] | ||
|p1= firstCircle: [[Object]], [[String]] or [[Array]] - first circle. Can be a trigger, a marker or an array in form | |||
*0: [[Array]] - circleCenter | |||
**0: [[Number]] - coordinate X | |||
**1: [[Number]] - coordinate Y | |||
*1: [[Number]] - radius | |||
|p2= secondCircle: [[Object]], [[String]] or [[Array]] - second circle. Same as above. | |||
| | |p3= 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 | ||
| | |p4= 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 | ||
| | |r1= [[Array]] - 2D Position | ||
|x1= < | |x1= <sqf>[trigger1, trigger2, 0.75, 0.75] call BIS_fnc_randomPosIntersection;</sqf> | ||
| | |seealso= | ||
}} | }} | ||
Latest revision as of 15:49, 8 November 2023
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:
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