Bearbeiten

Freigeben über


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.

public:
 static UnityEngine::Vector3 ClampComponentWise(UnityEngine::Vector3 value, UnityEngine::Vector3 min, UnityEngine::Vector3 max);
public static UnityEngine.Vector3 ClampComponentWise (UnityEngine.Vector3 value, UnityEngine.Vector3 min, UnityEngine.Vector3 max);
static member ClampComponentWise : UnityEngine.Vector3 * UnityEngine.Vector3 * UnityEngine.Vector3 -> UnityEngine.Vector3
Public Function ClampComponentWise (value As Vector3, min As Vector3, max As Vector3) As Vector3

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