pingpong

fun pingpong(x: Double, length: Double = 1.0): Double

Returns a value that alternates ("ping-pongs") between 0 and length.

Return

The alternated value.

Parameters

x

The value to pingpong.