Calculates a truth table for one or more binary boolean operators. The truth table is represented as a 2D array where each row is [p, q, op1(p,q), op2(p,q), ...].
const table = Chalkboard.bool.truthTable(Chalkboard.bool.AND, Chalkboard.bool.OR);// Returns:// [// [false, false, false, false],// [false, true, false, true],// [true, false, false, true],// [true, true, true, true]// ] Copy
const table = Chalkboard.bool.truthTable(Chalkboard.bool.AND, Chalkboard.bool.OR);// Returns:// [// [false, false, false, false],// [false, true, false, true],// [true, false, false, true],// [true, true, true, true]// ]
One or more binary boolean operators
Calculates a truth table for one or more binary boolean operators. The truth table is represented as a 2D array where each row is [p, q, op1(p,q), op2(p,q), ...].
Example