Arma 3 Scripting

Command in Math - Vectors

vectorLinearConversion

Also available as Markdown and JSON, or read the original wiki page.

Description

Interpolates vector between the given vectorFrom and vectorTo value according to the given range value.

Syntax

vectorLinearConversion [rangeFrom, rangeTo, rangeValue, vectorFrom, vectorTo, clip]

Parameters:

Returns: Vector3D - interpolated vector

Examples

Example 1

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

Example 2

vectorLinearConversion [0, 1, 100, [0,0,0], [25,50,100], true];    // [25,50,100]

Example 3

vectorLinearConversion [0, 1, 100, [0,0,0], [25,50,100], false];    // [2500,5000,10000]

See also

linearConversion · bezierInterpolation · matrixMultiply · matrixTranspose