BIS fnc linearConversion: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (note & see also)
(Added description, syntax and note about linearConversion engine command)
Line 8: Line 8:
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
|
File: fn_linearConversion.sqf
Linear conversion of a value from one set to another
 
{{Feature arma3|This function became obsolete with the introduction of [[linearConversion]]}}
Description:
|= Description
Linear conversion of a value from one set to another.
 
Parameter(s):
_this select 0: Array (originalSet)
Note: should be two elements [minimumValue, maximumValue]
_this select 1: Scalar (originalValue)
_this select 2: Array (newSet)
Note: should be two elements [minimumValue, maximumValue]
Returns:
Scalar (newValue)
*/
 
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_linearConversion]]; --> |= Syntax
| <!-- [] call [[BIS_fnc_linearConversion]]; --> |= Syntax


|p1= |= Parameter 1
|p1= [[Array]] - [minimumValue,maximumValue] (originalSet)|= Parameter 1
 
|p2= [[Scalar]] - (originalValue)|= Parameter 2
| |= Return value
|p3= [[Array]] - [minimumValue,maximumValue] (newSet)|= Parameter 3
|[[Scalar]] (newValue) |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 13:57, 29 March 2016


Hover & click on the images for description

Description

Description:
Linear conversion of a value from one set to another
Arma 3
This function became obsolete with the introduction of linearConversion
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
Syntax needed
Parameters:
Array - [minimumValue,maximumValue] (originalSet)
Scalar - (originalValue)
Array - [minimumValue,maximumValue] (newSet)
Return Value:
Scalar (newValue)

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

Notes

Posted on Aug 1, 2014 - 23:39
ffur2007slx2_5
(A3 0.50) It is recommended to use linearConversion instead of BIS_fnc_linearConversion: linearConversion [0,100,50,0,50,true]; //same as [[0,100],50,[0,50]] call BIS_fnc_linearConversion

Bottom Section