Skip to content

Commit

Permalink
Fix xnor gate out
Browse files Browse the repository at this point in the history
  • Loading branch information
hemmer committed Jul 13, 2024
1 parent 1b955db commit 91c870c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cosmos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ struct Cosmos : Module {
outputs[NAND_GATE_OUTPUT].setVoltageSimd<float_4>(nandGateOut, c);
outputs[NAND_TRIG_OUTPUT].setVoltageSimd<float_4>(nandTriggerOut, c);

const float_4 xnorGateOut = ifelse((x < 0) ^ (y < 0), 10.f, 0.f);
const float_4 xnorGateOut = ifelse((x > 0) ^ (y > 0), 0.f, 10.f);
const float_4 xnorTriggerHigh = logicalXnorGate[c].process(xnorGateOut);
logicalXnorPulseGenerator[c].trigger(xnorTriggerHigh, 1e-3);
const float_4 xnorTriggerOut = ifelse(logicalXnorPulseGenerator[c].process(args.sampleTime), 10.f, 0.f);
Expand Down

0 comments on commit 91c870c

Please sign in to comment.