Star

Created With

linkOP()

Static method that returns the quadrille obtained after applying the given logical operator between the two given quadrilles. This method is useful to implement the other high-level logical operators. For instance the AND operator is implemented as follows:

p5.quadrille.js
1linkstatic AND(quadrille1, quadrille2, row=0, col=0) {

2link return this.OP(quadrille1, quadrille2,

3link (q1, q2) => {

4link if (q1 && q2) {

5link return q1;

6link }

7link },

8link row, col);

9link}

linkSyntax

Quadrille.OP(quadrille1, quadrille2, operator, [row], [col])

linkParameters

quadrille1Quadrille: first quadrille
quadrille2Quadrille: second quadrille
operatorFunction: the function object defining the logical operator
rowNumber: quadrille2 to quadrille1 vertical displacement default is 0. Negative values are allowed
colNumber: quadrille2 to quadrille1 horizontal displacement default is 0. Negative values are allowed
OP()SyntaxParameters

Home

p5.js functionschevron_right

Properties

I/Ochevron_right
Boolean operatorschevron_right
Geometry transformationschevron_right
Visual computingchevron_right
Other representationschevron_right

Demo