vectorLinearConversion: Difference between revisions
BrettMayson (talk | contribs) mNo edit summary |
m (updated data type for parsing) |
||
| Line 16: | Line 16: | ||
|p3= rangeValue: [[Number]] - variable range value | |p3= rangeValue: [[Number]] - variable range value | ||
|p4= vectorFrom: [[ | |p4= vectorFrom: [[Vector3D]] - start "from" vector | ||
|p5= vectorTo: [[ | |p5= vectorTo: [[Vector3D]] - end "to" vector | ||
|p6= clip: [[Boolean]] - (Optional, default [[false]]) if [[true]], range value will be clipped to stay within "from" - "to" range | |p6= clip: [[Boolean]] - (Optional, default [[false]]) if [[true]], range value will be clipped to stay within "from" - "to" range | ||
|r1= [[ | |r1= [[Vector3D]] - interpolated vector | ||
|x1= <sqf>vectorLinearConversion [0, 1, 0.5, [0,0,0], [25,50,100], false]; // [12.5,25,50]</sqf> | |x1= <sqf>vectorLinearConversion [0, 1, 0.5, [0,0,0], [25,50,100], false]; // [12.5,25,50]</sqf> | ||
Latest revision as of 18:41, 5 January 2026
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: Vector3D - start "from" vector
- vectorTo: Vector3D - end "to" vector
- clip: Boolean - (Optional, default false) if true, range value will be clipped to stay within "from" - "to" range
- Return Value:
- Vector3D - 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.
Only post proven facts here! Add Note