- All Known Implementing Classes:
SineMaker
public interface ISineMaker
Top-level abstraction of the generation of sinusoidally varying numerical values. The range of values
produced and the step between subsequent values are determined by the concrete implementation
of the interface.
To maximally decouple an application from the sine maker's implementation any variable representing a sine maker
should be typed to this interface, not to any concrete implementation. For example:
ISineMaker mySineMaker = new SineMaker()
- Author:
- swong
-
Method Summary
-
Method Details
-
getDblVal
double getDblVal()Returns a different value each time it is called. The value varies smoothly in a sinusoidal fashion, incrementing each time as per the above specified delta angle increase.- Returns:
- the next value as a double
-
getIntVal
int getIntVal()Same as getDblVal, but returns the result rounded to the nearest integer. Note that getDblVal and getIntVal are not independent as getIntVal merely calls getDblVal.- Returns:
- the next value as an int
-