What it does
math.wrap takes v, min and max.
Signature
math.wrap(v, min, max)Arguments
vminmax
Example · generated
function update(dt) { math.wrap(0.5, 0, 1);}math.wrap is called with values of the shape its signature asks for. The code sits in update(dt), which the engine calls every frame: dt is the time since the last one, in seconds.