Skip to content

raylib.Vector2Reflect

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Calculate reflected vector to normal

Parameters

Parameter Default Value Note
v [0, 0]
normal [0, 1]

Return value

Condition Return Value
(always) list

Notes

Example

v = [1, -1]       // incoming direction (going down-right)
normal = [0, 1]   // surface normal pointing up
result = raylib.Vector2Reflect(v, normal)
print result  // [1, 1]

Clone this wiki locally