BIS_fnc_linearConversion

From Bohemia Interactive Community
Jump to navigation Jump to search
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:
Math

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:
[[-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

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