ch.aplu.util
Class Waveform.SquareWave
java.lang.Object
ch.aplu.util.Waveform.SquareWave
- All Implemented Interfaces:
- Waveform
- Enclosing interface:
- Waveform
public static class Waveform.SquareWave
- extends java.lang.Object
- implements Waveform
Implements a waveform (square).
Method Summary |
double |
f(double t,
double freq)
Declares a square wave of given frequency with amplitude 1. |
java.lang.String |
toString()
Returns class information. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Waveform.SquareWave
public Waveform.SquareWave()
f
public double f(double t,
double freq)
- Declares a square wave of given frequency with amplitude 1.
- Specified by:
f
in interface Waveform
- Parameters:
t
- the time argumentfreq
- the frequency argument
- Returns:
- the function return value
toString
public java.lang.String toString()
- Returns class information.
- Overrides:
toString
in class java.lang.Object
- Returns:
- information