String returns a pretty-printed description of the SinePacer's behaviour: SinePacer{ Period: time.Hour, Mean: Rate{100, time.Second}, Amp: Rate{50, time.Second}, StartAt: MeanDown, } => Sine{Constant{100 hits/1s} ± Constant{50 hits/1s} / 1h, offset 1𝛑}
()
| 164 | // } => |
| 165 | // Sine{Constant{100 hits/1s} ± Constant{50 hits/1s} / 1h, offset 1𝛑} |
| 166 | func (sp SinePacer) String() string { |
| 167 | return fmt.Sprintf("Sine{%s ± %s / %s, offset %g𝛑}", sp.Mean, sp.Amp, sp.Period, sp.StartAt/math.Pi) |
| 168 | } |
| 169 | |
| 170 | // invalid tests the constraints documented in the SinePacer struct definition. |
| 171 | func (sp SinePacer) invalid() bool { |
no outgoing calls