vectorLinearConversion

From Bohemia Interactive Community
Revision as of 17:38, 29 April 2019 by POLPOX (talk | contribs)
Jump to navigation Jump to search
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

Bottom Section