Click or drag to resize

MathfWrap Method (Single, Single, Single)

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

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

Parameters

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

Return Value

Type: Single
The wrapped value.
See Also