linearConversion: Difference between revisions
Jump to navigation
Jump to search
m (Text replace - "{{uc:{{PAGENAME}}}}" to "{{uc:{{PAGENAME}}}} {{uc:{{PAGENAME}}}}") |
No edit summary |
||
Line 42: | Line 42: | ||
<dl class='command_description'> | <dl class='command_description'> | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
<dd class="notedate">Posted on Mar 29, 2014 - 09:39 | |||
<dt class="note">'''[[User:ffur2007slx2_5|ffur2007slx2_5]]'''<dd class="note"> | |||
Since ArmA3 ver 0.50 old BIS function [[BIS_fnc_linearConversion]] has been deprecated and please always use [[linearConversion]] instead. E.g.<br> | |||
<code>linearConversion [0,100,50,0,50,false]; //same as [[0,100],50,[0,50]] call BIS_fnc_linearConversion</code> | |||
<!-- Note Section END --> | <!-- Note Section END --> | ||
</dl> | </dl> |
Revision as of 02:41, 29 March 2014
Description
- Description:
- Converts value in interval [min, max] to newMin + a*(max-min)/(newMax - newMin), potentially clamps the final value.
- Groups:
- Uncategorised
Syntax
- Syntax:
- linearConversion [min, max, value, newMin, newMax, clamp]
- Parameters:
- [min, max, value, newMin, newMax, clamp]: Object
- min: Number
- max: Number
- value: Number
- newMin: Number
- newMax: Number
- clamp: Boolean
- Return Value:
- Number
Examples
- Example 1:
linearConversion [4, 8, 5, 0, 1, false]
Additional Information
- See also:
- See also needed
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
Notes
- Posted on Mar 29, 2014 - 09:39
- ffur2007slx2_5
-
Since ArmA3 ver 0.50 old BIS function BIS_fnc_linearConversion has been deprecated and please always use linearConversion instead. E.g.
linearConversion [0,100,50,0,50,false]; //same as [[0,100],50,[0,50]] call BIS_fnc_linearConversion