-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.Vector2ClampValue
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Clamp the magnitude of the vector between two min and max values
| Parameter | Default Value | Note |
|---|---|---|
| v | [0, 0] | |
| min | 0 | |
| max | 1 |
| Condition | Return Value |
|---|---|
| (always) | list |
v = [3, 4] // length 5
result = raylib.Vector2ClampValue(v, 0, 3)
print result // scaled so magnitude is 3: [1.8, 2.4]