Arma 3 Scripting

BIS_fnc_linearConversion

  • Deprecated
  • Arma 3 v0.50
  • First in Arma 2: Operation Arrowhead v1.50

Function · Markdown · JSON · original wiki page

Warning

This function is deprecated. Use linearConversion instead.

Description

Linear conversion of a value from one set to another

Note

This function became obsolete with the introduction of linearConversion.

Syntax

[[minFrom, maxFrom], value, [minTo, maxTo]] call BIS_fnc_linearConversion

Parameters:

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

See also

linearConversion