vectorLinearConversion: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " +" to " ") |
BrettMayson (talk | contribs) mNo edit summary |
||
(10 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| arma3 | |game1= arma3 | ||
|version1= 1.92 | |||
|1.92 | |||
|gr2= Math - Vectors | |gr2= Math - Vectors | ||
| Interpolates vector between the given | |descr= Interpolates vector between the given ''vectorFrom'' and ''vectorTo'' value according to the given range value. | ||
| [[vectorLinearConversion]] [rangeFrom, rangeTo, rangeValue, vectorFrom, vectorTo, clip] | |s1= [[vectorLinearConversion]] [rangeFrom, rangeTo, rangeValue, vectorFrom, vectorTo, clip] | ||
|p1= | |p1= rangeFrom: [[Number]] - start "from" range | ||
|p2= | |p2= rangeTo: [[Number]] - end "to" range | ||
|p3= | |p3= rangeValue: [[Number]] - variable range value | ||
|p4= | |p4= vectorFrom: [[Array]] - start "from" vector | ||
|p5= | |p5= vectorTo: [[Array]] - end "to" vector | ||
|p6= | |p6= clip: [[Boolean]] - (Optional, default [[false]]) if [[true]], range value will be clipped to stay within "from" - "to" range | ||
| | |r1= [[Array]] - interpolated vector | ||
| | |x1= <sqf>vectorLinearConversion [0, 1, 0.5, [0,0,0], [25,50,100], false]; // [12.5,25,50]</sqf> | ||
|x2= <sqf>vectorLinearConversion [0, 1, 100, [0,0,0], [25,50,100], true]; // [25,50,100]</sqf> | |||
|x3= <sqf>vectorLinearConversion [0, 1, 100, [0,0,0], [25,50,100], false]; // [2500,5000,10000]</sqf> | |||
|x3= < | |||
|seealso= [[linearConversion]] | |seealso= [[linearConversion]] [[bezierInterpolation]] [[matrixMultiply]] [[matrixTranspose]] | ||
}} | }} | ||
Latest revision as of 21:21, 28 September 2023
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: 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: Boolean - (Optional, default false) if true, range value will be clipped to stay within "from" - "to" range
- Return Value:
- Array - interpolated vector
Examples
- Example 1:
- Example 2:
- Example 3:
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