Package ch.epfl.cs107.play.signal.logic
Class LogicNumber
java.lang.Object
ch.epfl.cs107.play.signal.logic.LogicGate
ch.epfl.cs107.play.signal.logic.LogicNumber
Implementation of a Logical Number. The signal is true if the given signals interpreted as binary digits
equals the number
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionLogicNumber(int value, Logic... signals) Default constructor of logical Number -
Method Summary
Methods inherited from class ch.epfl.cs107.play.signal.logic.LogicGate
getIntensity, isOff, isOn
-
Constructor Details
-
LogicNumber
Default constructor of logical Number- Parameters:
value- (int): value we want to represent with the signalssignals- (Array of Logic): all digits signals, smallest power of two first. Not null
-
-
Method Details
-
getIntensity
public float getIntensity()- Returns:
- (float) : the signal intensity, usually 0.0 or 1.0
-