Difference between revisions of "decayGraphValues"

From Bohemia Interactive Community
Jump to navigation Jump to search
(WIP - someone who has knowledge of this please write more information)
 
(Document the current behaviour)
Line 13: Line 13:
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| Decay old graph values towards 0, unless new value is higher){{wip}} |Description=
+
| Multiplies graph values by the given coefficient. The corresponding lower bound value is used instead if the product is smaller than the bound. |Description=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| [[decayGraphValues]] [oldValues, newValues, coef] |Syntax=
+
| [[decayGraphValues]] [lowerBoundValues, graphValues, coef] |Syntax=
  
|p1=[oldValues, newValues, coef]: [[Array]]
+
|p1=[lowerBoundValues, graphValues, coef]: [[Array]]
  
|p2=oldValues:  
+
|p2=lowerBoundValues: [[Array]] - Lower bound for the new graph
  
|p3=newValues:  
+
|p3=graphValues: [[Array]] - Graph values
  
|p4=coef:  
+
|p4=coef: [[Number]] - The coefficient to be multiplied with
  
 
| [[Array]] |Return Value=
 
| [[Array]] |Return Value=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|x1= <code></code> |Example 1=
+
|x1= <code>[[decayGraphValues]] &#91;[1,2,3,4,5], [1,4,9,16,25], 0.3] //returns [1,2,3,4.8,7.5]</code> |Example 1=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  

Revision as of 00:12, 9 July 2019

Hover & click on the images for description

Description

Description:
Multiplies graph values by the given coefficient. The corresponding lower bound value is used instead if the product is smaller than the bound.
Multiplayer:
-
Groups:
Uncategorised

Syntax

Syntax:
decayGraphValues [lowerBoundValues, graphValues, coef]
Parameters:
[lowerBoundValues, graphValues, coef]: Array
lowerBoundValues: Array - Lower bound for the new graph
graphValues: Array - Graph values
coef: Number - The coefficient to be multiplied with
Return Value:
Array

Examples

Example 1:
decayGraphValues [[1,2,3,4,5], [1,4,9,16,25], 0.3] //returns [1,2,3,4.8,7.5]

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

Bottom Section