@@ -1101,17 +1101,16 @@ export class Matrix extends MatrixInterface {
11011101 * // p5.js script example
11021102 * <div class="norender"><code>
11031103 * function setup() {
1104- *
11051104 * const matrix = new p5.Matrix(4); // Create a 4x4 identity matrix
1106- * console.log("Original Matrix:", matrix.matrix);
1105+ * console.log("Original Matrix:", matrix.matrix.slice().toString()); // [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]
11071106 *
11081107 * // Translate the matrix by a 3D vector
11091108 * matrix.translate([10, 20, 30]);
1110- * console.log("After 3D Translation (10, 20, 30):", matrix.matrix);
1109+ * console.log("After 3D Translation (10, 20, 30):", matrix.matrix.slice().toString()); // [1,0,0,0,0,1,0,0,0,0,1,0,10,20,30,1]
11111110 *
11121111 * // Translate the matrix by a 2D vector
11131112 * matrix.translate([5, 15]);
1114- * console.log("After 2D Translation (5, 15):", matrix.matrix);
1113+ * console.log("After 2D Translation (5, 15):", matrix.matrix.slice().toString()); // [1,0,0,0,0,1,0,0,0,0,1,0,15,35,30,1]
11151114 * }
11161115 * </code></div>
11171116 */
0 commit comments