Module function reference

bounce

A reference entry for bounce

Module function · Graphics/Physics

bounce (list state, list bounds, number restitution, number radius) ⇒ list

Keeps a moving body inside [left, right, bottom, top] and reflects its velocity at the boundaries.