Package ch.epfl.cs107.play.signal
Interface Signal
- All Known Subinterfaces:
Logic
- All Known Implementing Classes:
And,LogicGate,LogicNumber,MultipleAnd,Nand,Not,Numeric,Or,Sawtooth,Sine,Square,Triangle,Xor
public interface Signal
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatEpsilon value to compare floating value -
Method Summary
Modifier and TypeMethodDescriptionfloatgetIntensity(float t) Intensity getter for given timedefault booleanCheck if this signal and other given signal are equivalent for given time t
-
Field Details
-
EPSILON
static final float EPSILONEpsilon value to compare floating value- See Also:
-
-
Method Details
-
getIntensity
float getIntensity(float t) Intensity getter for given time- Parameters:
t- (float): the time at which we want the intensity- Returns:
- (float): signal intensity, usually between 0.0 and 1.0
-
is
Check if this signal and other given signal are equivalent for given time t- Parameters:
other- (Signal): given other signal. Not nullt- (float): given time- Returns:
- (boolean) : true if the signal are equivalent
-