repeat()


Syntax

repeat(x, l)

Returns

Number

Description

Loops the value x so that it wraps around when it exceeds the length l, keeping the result between 0 and l.

Arguments

  • x (Number): The value to loop.
  • l (Number): The loop interval.