transpose()
Transposes the quadrille cells.
Example
(mouse click or press any key to transpose
the quadrille)
code
let quadrille;
function setup() {
createCanvas(4 * Quadrille.cellLength, 4 * Quadrille.cellLength);
quadrille = createQuadrille(4, 4, 3, 'đ');
quadrille.rand(4, 'đ');
}
function draw() {
background('orange');
drawQuadrille(quadrille);
}
function mouseClicked() {
quadrille.transpose();
}
function keyPressed() {
quadrille.transpose();
}
âšī¸
transpose()
is useful for performing column transformations using row commands. For instance, q.transpose().row(col).transpose()
clones column col
.Syntax
transpose()