vectorLinearConversion

From Bohemia Interactive Community
Revision as of 06:34, 26 April 2019 by POLPOX (talk | contribs) (Created page with "{{Command|= ____________________________________________________________________________________________ | arma3dev |Game= |1.93|Game Version =(number surrounded by NO SPACE...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
-wrong parameter ("arma3dev") defined!-[[:Category:Introduced with arma3dev version 1.93|1.93]]
Hover & click on the images for description

Description

Description:
Converts given vector from given "from" range to wanted "to" range. If clipping is set to true, the resulting value is guaranteed to be within "to" range no matter what.
Multiplayer:
-
Groups:
Uncategorised

Syntax

Syntax:
vectorLinearConversion [minFrom, maxFrom, value, vector3Min, vector3Max, clip]
Parameters:
[minFrom, maxFrom, value, vector3Min, vector3Max, clip]: Array
minFrom: Number - start "from" range
maxFrom: Number - end "from" range
value: Number - given value from "from" range
vector3Min: Array - start "to" range
vector3Max: Array - end "to" range
clip (Optional): Boolean - if true, resulting value cannot leave "to" range. Default: false
Return Value:
Array

Examples

Example 1:
vectorLinearConversion [0,1,0.5,[0,0,0],[25,50,100],false];//[12.5,25,50]

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

[[Category:Introduced with arma3dev version 1.93]][[ Category: arma3dev: New Scripting Commands | VECTORLINEARCONVERSION]][[ Category: arma3dev: Scripting Commands | VECTORLINEARCONVERSION]]

Bottom Section