vectorLinearConversion: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "<!-- Appropriate categories go here -->" to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma3 | | arma3 | ||
|1.92 | |1.92 | ||
|arg | |arg= | ||
|eff | |eff= | ||
|gr2= Math - Vectors | |gr2= Math - Vectors | ||
|serverExec | |serverExec= | ||
| Interpolates vector between the given "vectorFrom" and "vectorTo" value according to the given range value | | Interpolates vector between the given "vectorFrom" and "vectorTo" value according to the given range value | ||
| [[vectorLinearConversion]] [rangeFrom, rangeTo, rangeValue, vectorFrom, vectorTo, clip] | | [[vectorLinearConversion]] [rangeFrom, rangeTo, rangeValue, vectorFrom, vectorTo, clip] | ||
|p1=[rangeFrom, rangeTo, rangeValue, vectorFrom, vectorTo, clip]: [[Array]] | |p1=[rangeFrom, rangeTo, rangeValue, vectorFrom, vectorTo, clip]: [[Array]] | ||
Line 31: | Line 31: | ||
|p7=clip (Optional): [[Boolean]] - if [[true]], range value will be clipped to stay within "from" - "to" range. Default: [[false]] | |p7=clip (Optional): [[Boolean]] - if [[true]], range value will be clipped to stay within "from" - "to" range. Default: [[false]] | ||
| [[Array]] - interpolated vector | | [[Array]] - interpolated vector | ||
|x1= <code>[[vectorLinearConversion]] [0,1,0.5,[0,0,0],[25,50,100],[[false]]]; // [12.5,25,50]</code> | |x1= <code>[[vectorLinearConversion]] [0,1,0.5,[0,0,0],[25,50,100],[[false]]]; // [12.5,25,50]</code> | ||
|x2= <code>[[vectorLinearConversion]] [0,1,100,[0,0,0],[25,50,100],[[true]]]; // [25,50,100]</code> | |x2= <code>[[vectorLinearConversion]] [0,1,100,[0,0,0],[25,50,100],[[true]]]; // [25,50,100]</code> | ||
|x3= <code>[[vectorLinearConversion]] [0,1,100,[0,0,0],[25,50,100],[[false]]]; // [2500,5000,10000]</code> | |x3= <code>[[vectorLinearConversion]] [0,1,100,[0,0,0],[25,50,100],[[false]]]; // [2500,5000,10000]</code> | ||
| [[linearConversion]], [[bezierInterpolation]], [[matrixMultiply]], [[matrixTranspose]] | | [[linearConversion]], [[bezierInterpolation]], [[matrixMultiply]], [[matrixTranspose]] | ||
}} | }} | ||
Revision as of 11:43, 18 January 2021
Description
- Description:
- Interpolates vector between the given "vectorFrom" and "vectorTo" value according to the given range value
- Groups:
- Math - Vectors
Syntax
- Syntax:
- vectorLinearConversion [rangeFrom, rangeTo, rangeValue, vectorFrom, vectorTo, clip]
- Parameters:
- [rangeFrom, rangeTo, rangeValue, vectorFrom, vectorTo, clip]: Array
- rangeFrom: Number - start "from" range
- rangeTo: Number - end "to" range
- rangeValue: Number - variable range value
- vectorFrom: Array - start "from" vector
- vectorTo: Array - end "to" vector
- clip (Optional): Boolean - if true, range value will be clipped to stay within "from" - "to" range. Default: false
- Return Value:
- Array - interpolated vector
Examples
- Example 1:
vectorLinearConversion [0,1,0.5,[0,0,0],[25,50,100],false]; // [12.5,25,50]
- Example 2:
vectorLinearConversion [0,1,100,[0,0,0],[25,50,100],true]; // [25,50,100]
- Example 3:
vectorLinearConversion [0,1,100,[0,0,0],[25,50,100],false]; // [2500,5000,10000]
Additional Information
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