MathUtilities.CLampLerp(Single, Single, Single, Single) Method
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.
Clamps via a lerp for a "soft" clamp effect
C++
public:
static float CLampLerp(float pos, float min, float max, float clampFactor);
public static float CLampLerp (float pos, float min, float max, float clampFactor);
static member CLampLerp : single * single * single * single -> single
Public Shared Function CLampLerp (pos As Single, min As Single, max As Single, clampFactor As Single) As Single
- pos
- Single
number to clamp
- min
- Single
if pos is less than min, then lerp clamps to this value
- max
- Single
if pos is more than max, lerp clamps to this value
- clampFactor
- Single
Range from 0.0f to 1.0f of how close to snap to min and max
A soft clamped value
Produkt | Versionen |
---|---|
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 |