vectorLinearConversion

From Bohemia Interactive Community
Jump to navigation Jump to search
Introduced with Arma 3 version 1.92
  

Click on the images for descriptions

Introduced in

Game:
Arma 3
Version:
1.92

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.

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

Multiplayer:
-
See also:
linearConversion

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Bottom Section