pingpong()


Syntax

pingpong(x, l)

Returns

Number

Description

Oscillates the value x so that it stays between 0 and the length l.

Arguments

  • x (Number): The value to oscillate.
  • l (Number): The maximum value of the oscillation.