ORGate
ORGate
Outputs true when at least one input is true.
Constructor
public ORGate
new ORGate(not)
Creates an OR Gate with a default of 2 ports, a minimum of two ports, a maximum of 8 ports, and a size of 60 by 50 pixels.
Parameters
-
not: false | true
– Negates this gate.
Properties
No publicly accessible properties on ORGate
Methods
public activate
activate() => void
Checks if some of the inputs are on, and if they are, activates the gate.
public getOffset
getOffset() => Vector
Calculates a height offset to account for more inputs than the default height can hold.
Returns
-
Vector
– A vector with the symmetric offset based on the current input number.
public getDisplayName
getDisplayName() => string
Returns the name of the gate, depending on if the instance is an or gate or a nor gate.
Returns
-
string
– The string "NOR Gate" or "OR Gate".
public getImageName
getImageName() => string
Returns the name of the image displayed in the UI for the gate.
Returns
-
string
– The string "or.svg".
Static Methods
No static methods for ORGate
NORGate
Outputs true when no inputs are true.
Constructor
public NORGate
new NORGate()
*Description needed*Properties
No publicly accessible properties on NORGate
Methods
No methods for NORGate
Static Methods
No static methods for NORGate
Functions
GetQuadraticOffset
GetQuadraticOffset(numInputs) => number
Description needed
Parameters
-
numInputs: number
– Description needed
Returns
-
number
– Description needed