-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.Wrap
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Wrap input value from min to max
| Parameter | Default Value | Note |
|---|---|---|
| value | 0 | |
| min | 0 | |
| max | 1 |
| Condition | Return Value |
|---|---|
| (always) | number |
// Keep an angle in the range [0, 360)
angle = 370
wrapped = raylib.Wrap(angle, 0, 360)
print wrapped // 10
// Wrap a negative value
wrapped2 = raylib.Wrap(-10, 0, 360)
print wrapped2 // 350