sawtooth or square wave, improved documentation