Edit

Share via


UInt32.Clamp(UInt32, UInt32, UInt32) Method

Definition

Clamps a value to an inclusive minimum and maximum value.

C#
public static uint Clamp(uint value, uint min, uint max);

Parameters

value
UInt32

The value to clamp.

min
UInt32

The inclusive minimum to which value should clamp.

max
UInt32

The inclusive maximum to which value should clamp.

Returns

The result of clamping value to the inclusive range of min and max.

Implements

Applies to

Product Versions
.NET 7, 8, 9