Modifier

Partager via


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

Definition

Clamps via a lerp for a "soft" clamp effect

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

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