BIS fnc linearConversion: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "|x1= <code></code> |= " to "|x1= <code></code> |EXAMPLE1=") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(33 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=function | |||
|game1= arma2oa | |||
|version1= 1.50 | |||
| | |game2= tkoh | ||
|version2= 1.00 | |||
| | |game3= arma3 | ||
|version3= 0.50 | |||
| | |gr1= Math | ||
| | |descr= Linear conversion of a value from one set to another | ||
{{Feature|arma3|This function became obsolete with the introduction of [[linearConversion]].}} | |||
| | |s1= [[minFrom, maxFrom], value, [minTo, maxTo]] call [[BIS_fnc_linearConversion]] | ||
| | |p1= minFrom: [[Number]] | ||
| [[ | |p2= maxFrom: [[Number]] | ||
|p3= value: [[Number]] | |||
|p4= minTo: [[Number]] | |||
|p5= maxTo: [[Number]] | |||
|r1= [[Number]] ''value'' adapted to [''minTo'', ''maxTo''] range | |||
|x1= <sqf> | |||
[[-50, 50], -50, [0, 1]] call BIS_fnc_linearConversion; // returns 0 | |||
[[-50, 50], 0, [0, 1]] call BIS_fnc_linearConversion; // returns 0.5 | |||
[[-50, 50], +50, [0, 1]] call BIS_fnc_linearConversion; // returns 1 | |||
</sqf> | |||
</ | |||
|seealso= [[linearConversion]] | |||
}} | |||
[[ | |||
Latest revision as of 00:07, 14 May 2023
Description
Syntax
- Syntax:
- [[minFrom, maxFrom], value, [minTo, maxTo]] call BIS_fnc_linearConversion
- Parameters:
- minFrom: Number
- maxFrom: Number
- value: Number
- minTo: Number
- maxTo: Number
- Return Value:
- Number value adapted to [minTo, maxTo] range
Examples
- Example 1:
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