Periodicity test

Empirical measurement of each wave's period - the x-distance over which Waves.wave(x) repeats itself. Used to close curved shapes cleanly: if the total x-sweep is an integer multiple of the period, endShape(CLOSE) draws a zero-length line.

Method

Ready.
Verdicts: