square

Macro square 

Source
macro_rules! square {
    (frequency: $frequency:expr) => { ... };
    (frequency: $frequency:expr, amplitude: $amplitude:expr) => { ... };
    (frequency: $frequency:expr, amplitude: $amplitude:expr, phase: $phase:expr) => { ... };
    ($frequency:expr) => { ... };
    ($frequency:expr, $amplitude:expr) => { ... };
    ($frequency:expr, $amplitude:expr, $phase:expr) => { ... };
}
Expand description

Builder macro for Square PeriodicFunction.

Takes up to 3 arguments - frequency {amplitude, {phase}}

argumentunitnotes
frequencyHzFrequecy of the periodic function. Also: 1 / period
amplitudearbitraryThe amplitude of the function in 0-peak notation.
phaseperiodsThe phase shift of the function. Value of 1 means full shift around.