getGraphValues: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\| *arma3 * * *\| *([0-2]\.[0-9]{2}) * " to "|game1= arma3 |version1= $1 ") |
Lou Montana (talk | contribs) m (Text replacement - " \| *(game[0-9]|version[0-9]|gr[0-9]|serverExec|mp|pr|descr|s[0-9]|p[0-9]{1,3}|r[0-9]|x1?[0-9]|seealso) *= +" to " |$1= ") |
||
Line 8: | Line 8: | ||
|descr= Generate graph y - coordinates of all input values within specific x and y range. | |descr= Generate graph y - coordinates of all input values within specific x and y range. | ||
|s1= | |s1= [[getGraphValues]] <nowiki>[[graphMinX, graphMaxX, graphMinY, graphMaxY, valueCount, randomOffset], x1, y1, x2, y2, ... xn, yn]</nowiki> | ||
|p1= graphMinX: [[Number]] - minimum x-axis value | |p1= graphMinX: [[Number]] - minimum x-axis value |
Revision as of 22:13, 19 June 2021
Description
- Description:
- Generate graph y - coordinates of all input values within specific x and y range.
- Groups:
- Math
Syntax
- Syntax:
- getGraphValues [[graphMinX, graphMaxX, graphMinY, graphMaxY, valueCount, randomOffset], x1, y1, x2, y2, ... xn, yn]
- Parameters:
- graphMinX: Number - minimum x-axis value
- graphMaxX: Number - maximum x-axis value
- graphMinY: Number - minimum y-axis value
- graphMaxY: Number - maximum y-axis value
- valueCount: Number - number of values the returned array should have
- randomOffset: Number - random range for returned y value
- x1..n: Number - nth x value
- y1..n: Number - nth y value
- Return Value:
- Array of Array of Numbers - to format [arrayOfYvalues, arrayOfXvalues]
Examples
- Example 1:
private _minX = 0; private _maxX = 10; private _minY = 0; private _maxY = 100; private _count = 11; private _random = 0; getGraphValues [ [_minX, _maxX, _minY, _maxY, _count, _random], 0, 5, 1, 10, 2, 100, 3, 50, 4, 30, 5, 100, 6, 10, 7, 50, 8, 75, 9, 100, 10, 100 ]; /* returns [[0.05, 0.1, 1, 0.5, 0.3, 1, 0.1, 0.5, 0.75, 1, 1], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]] supposedly [array of 1-based Y values, array of X values] */
Additional Information
- See also:
- decayGraphValues
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