Click or drag to resize

MathfWrap Method (Int32, Int32, Int32)

Wraps `value` between `min` and `max`. Usable for creating loop-alike behavior or infinite surfaces. If `min` is `0`, this is equivalent to PosMod(Int32, Int32), so prefer using that instead.

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

Parameters

value
Type: SystemInt32
The value to wrap.
min
Type: SystemInt32
The minimum allowed value and lower bound of the range.
max
Type: SystemInt32
The maximum allowed value and upper bound of the range.

Return Value

Type: Int32
The wrapped value.
See Also