MathUtilities.CLampLerp(Single, Single, Single, Single) Method

Definition

Clamps via a lerp for a "soft" clamp effect

C++
public:
 static float CLampLerp(float pos, float min, float max, float clampFactor);

Parameters

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

Returns

A soft clamped value

Applies to

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