@@ -1101,17 +1101,16 @@ export class Matrix extends MatrixInterface {
1101
1101
* // p5.js script example
1102
1102
* <div class="norender"><code>
1103
1103
* function setup() {
1104
- *
1105
1104
* 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]
1107
1106
*
1108
1107
* // Translate the matrix by a 3D vector
1109
1108
* 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]
1111
1110
*
1112
1111
* // Translate the matrix by a 2D vector
1113
1112
* 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]
1115
1114
* }
1116
1115
* </code></div>
1117
1116
*/
0 commit comments