MathUtilitiesClamp(Decimal, Decimal, Decimal) Method

Clamps a value between a minimum and maximum value.

Definition

Namespace: Avalonia.Utilities
Assembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static decimal Clamp(
	decimal val,
	decimal min,
	decimal max
)

Parameters

val  Decimal
The value.
min  Decimal
The minimum value.
max  Decimal
The maximum value.

Return Value

Decimal
The clamped value.

See Also