Table of Contents

Method ClampToZero

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

ClampToZero(double)

Clamps the specified value to zero if it is less than zero.

public static double ClampToZero(double value)

Parameters

value double

The value to clamp. If the value is negative, it will be clamped to zero; otherwise, the original value is returned.

Returns

double

The original value if it is zero or positive; otherwise, zero.

ClampToZero(float)

Clamps the specified value to zero if it is less than zero.

public static float ClampToZero(float value)

Parameters

value float

The value to clamp. If the value is negative, it will be clamped to zero; otherwise, the original value is returned.

Returns

float

The original value if it is zero or positive; otherwise, zero.