vectorLinearConversion: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Killzone Kid (talk | contribs) (Format example description) |
||
Line 13: | Line 13: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | Interpolates vector between the given "vectorFrom" and "vectorTo" value according to the given range value|Description= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[vectorLinearConversion]] [ | | [[vectorLinearConversion]] [rangeFrom, rangeTo, rangeValue, vectorFrom, vectorTo, clip] |Syntax= | ||
|p1=[ | |p1=[rangeFrom, rangeTo, rangeValue, vectorFrom, vectorTo, clip]: [[Array]] | ||
|p2= | |p2=rangeFrom: [[Number]] - start "from" range | ||
|p3= | |p3=rangeTo: [[Number]] - end "to" range | ||
|p4= | |p4=rangeValue: [[Number]] - variable range value | ||
|p5= | |p5=vectorFrom: [[Array]] - start "from" vector | ||
|p6= | |p6=vectorTo: [[Array]] - end "to" vector | ||
|p7=clip (Optional): [[Boolean]] - if true, | |p7=clip (Optional): [[Boolean]] - if [[true]], range value will be clipped to stay within "from" - "to" range. Default: [[false]] | ||
| Array |Return Value= | | [[Array]] - interpolated vector |Return Value= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>vectorLinearConversion [0,1,0.5,[0,0,0],[25,50,100],false];//[12.5,25,50]</code> |Example 1= | |x1= <code>[[vectorLinearConversion]] [0,1,0.5,[0,0,0],[25,50,100],[[false]]]; // [12.5,25,50]</code> |Example 1= | ||
|x2= <code>[[vectorLinearConversion]] [0,1,100,[0,0,0],[25,50,100],[[true]]]; // [25,50,100]</code> |Example 2= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Revision as of 06:43, 18 September 2019
Description
- Description:
- Interpolates vector between the given "vectorFrom" and "vectorTo" value according to the given range value
- Multiplayer:
- -
- Groups:
- Uncategorised
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]
Additional Information
- See also:
- linearConversion
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