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}}
argument | unit | notes |
---|---|---|
frequency | Hz | Frequecy of the periodic function. Also: 1 / period |
amplitude | arbitrary | The amplitude of the function in 0-peak notation. |
phase | periods | The phase shift of the function. Value of 1 means full shift around. |