Читати англійською Редагувати

Поділитися через


MathExtensions.ClampComponentWise(Vector3, Vector3, Vector3) Method

Definition

Preform a component wise clamp on a given vector. Each input component will be clamped by its corresponding minimum and maximum component as specified by the min and max input vectors.

C++
public:
 static UnityEngine::Vector3 ClampComponentWise(UnityEngine::Vector3 value, UnityEngine::Vector3 min, UnityEngine::Vector3 max);

Parameters

value
UnityEngine.Vector3

The vector whose components will be clamped by the given minimum and maximum vectors.

min
UnityEngine.Vector3

The vector whose components define the minimum value for the corresponding input vector component.

max
UnityEngine.Vector3

The vector whose components define the maximum value for the corresponding input vector component.

Returns

UnityEngine.Vector3

Returns a new vector whose components have been clamped by the specified minimum and maximum values.

Applies to

Продукт Версії
MRTK2 Unity 2018 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0
MRTK2 Unity 2019 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0
MRTK2 Unity 2020 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0