Skip to content

raylib.Vector2Clamp

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Clamp the components of the vector between min and max values specified by the given vectors

Parameters

Parameter Default Value Note
v [0, 0]
min [-1, -1]
max [1, 1]

Return value

Condition Return Value
(always) list

Notes

Example

v = [3, -5]
minV = [0, 0]
maxV = [2, 2]
result = raylib.Vector2Clamp(v, minV, maxV)
print result  // [2, 0]

Clone this wiki locally