Click or drag to resize

MathfClamp Method (Int32, Int32, Int32)

Clamps a `value` so that it is not less than `min` and not more than `max`.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static int Clamp(
	int value,
	int min,
	int max
)

Parameters

value
Type: SystemInt32
The value to clamp.
min
Type: SystemInt32
The minimum allowed value.
max
Type: SystemInt32
The maximum allowed value.

Return Value

Type: Int32
The clamped value.
See Also