MathUtilities.

Clamp(int, int, int) Method

Summary

Clamps a value between a minimum and maximum value.
Namespace
Avalonia.Utilities
Containing Type
MathUtilities

Syntax

public static int Clamp(int val, int min, int max)

Parameters

Name Type Description
val int The value.
min int The minimum value.
max int The maximum value.

Return Value

Type Description
int The clamped value.