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:
rangeFrom: Number - start "from" rangerangeTo: Number - end "to" rangerangeValue: Number - variable range valuevectorFrom: Vector3D - start "from" vectorvectorTo: Vector3D - end "to" vectorclip: Boolean - (Optional, default false) if true, range value will be clipped to stay within "from" - "to" range
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