MathExtensions.ClampComponentWise(Vector3, Vector3, Vector3) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Returns a new vector whose components have been clamped by the specified minimum and maximum values.