Arma 3 Scripting

BIS_fnc_clampVector

  • Arma 3 v1.00

Function · Markdown · JSON · original wiki page

Description

Clamps vector values between provided min/max boundaries.

Note

This function can be used to clamp any Array of Numbers (even though it is not its main usage).

Syntax

[vector, min, max] call BIS_fnc_clampVector

Parameters:

Returns: Vector3D - the clamped vector

Examples

Example 1

private _newVelocity = [velocity vehicle player, -100, 100] call BIS_fnc_clampVector;
vehicle player setVelocity _newVelocity;

See also

BIS_fnc_clamp · vectorNormalized · vectorMultiply