utilities
Class SineMaker
java.lang.Object
utilities.SineMaker
public class SineMaker
- extends java.lang.Object
This class is used to create a sine wave oscillation of an integer value between specified
minimum and maximum values. This is accomplished through successive calls to next().
The oscillation rate is controlled by a parameter that sets the
angular increment between calls to next().
- Author:
- Stephen Wong
Constructor Summary |
SineMaker(java.lang.Integer min,
java.lang.Integer max,
java.lang.Double dtheta)
The constructor for SineMaker. |
Method Summary |
java.lang.Integer |
next()
Returns the next value of the sine wave oscillation. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SineMaker
public SineMaker(java.lang.Integer min,
java.lang.Integer max,
java.lang.Double dtheta)
- The constructor for SineMaker. It takes three arguments.
- Parameters:
min
- The minimum return value for next()max
- The maximum return value for next()dtheta
- The angular increment per call to next()
next
public java.lang.Integer next()
- Returns the next value of the sine wave oscillation.
- Returns:
- the next value of the sine wave oscillation.