Click or drag to resize

MathfClamp Method (Single, Single, Single)

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 float Clamp(
	float value,
	float min,
	float max
)

Parameters

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

Return Value

Type: Single
The clamped value.
See Also