pingPong

infix fun Number.pingPong(length: Number): Double

PingPongs (bounces) the value t, so that it is never larger than length and never smaller than 0.

Return

The pingponged value.

Parameters

length

The length of the pingpong.