Skip to content

Commit 9544f78

Browse files
committed
add console log output comments
1 parent 13b91df commit 9544f78

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/math/Matrices/Matrix.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -283,13 +283,13 @@ export class Matrix extends MatrixInterface {
283283
*
284284
* const originalMatrix = new p5.Matrix([1, 2, 3, 4]);
285285
* const copiedMatrix = originalMatrix.get();
286-
* console.log("Original Matrix:", originalMatrix.matrix);
287-
* console.log("Copied Matrix:", copiedMatrix.matrix);
286+
* console.log("Original Matrix:", originalMatrix.matrix); // Output: [1, 2, 3, 4]
287+
* console.log("Copied Matrix:", copiedMatrix.matrix); // Output: [1, 2, 3, 4]
288288
*
289289
* // Modify the copied matrix
290290
* copiedMatrix.setElement(2, 99);
291-
* console.log("Modified Copied Matrix:", copiedMatrix.matrix);
292-
* console.log("Original Matrix remains unchanged:", originalMatrix.matrix);
291+
* console.log("Modified Copied Matrix:", copiedMatrix.matrix); // Output: [1, 2, 99, 4]
292+
* console.log("Original Matrix remains unchanged:", originalMatrix.matrix); // Output: [1, 2, 3, 4]
293293
* }
294294
* </code></div>
295295
*/
@@ -608,8 +608,8 @@ export class Matrix extends MatrixInterface {
608608
* const matrix = new p5.Matrix([1, 2, 3, 4, 5, 6, 7, 8, 9]);
609609
* const vector = new p5.Vector(1, 2, 3);
610610
* const result = matrix.multiplyVec(vector);
611-
* console.log("Original Vector:", vector.toString());
612-
* console.log("Transformed Vector:", result.toString());
611+
* console.log("Original Vector:", vector.toString()); // Output : Original Vector: [1, 2, 3]
612+
* console.log("Transformed Vector:", result.toString()); // Output : Transformed Vector: [30, 36, 42]
613613
* }
614614
* </code></div>
615615
*/
@@ -1607,19 +1607,19 @@ export class Matrix extends MatrixInterface {
16071607
*
16081608
* // Define a vector
16091609
* const vector = new p5.Vector(1, 2, 3);
1610-
* console.log("Original Vector:", vector.toString());
1610+
* console.log("Original Vector:", vector.toString()); // Output: [1, 2, 3]
16111611
*
16121612
* // Apply the matrix to the vector
16131613
* const transformedVector = matrix.multiplyVec3(vector);
1614-
* console.log("Transformed Vector:", transformedVector.toString());
1614+
* console.log("Transformed Vector:", transformedVector.toString()); // Output: [30, 36, 42]
16151615
*
16161616
* // Modify the matrix (e.g., apply a scaling transformation)
16171617
* matrix.scale(2, 2, 2);
1618-
* console.log("Modified Matrix (Scaling):", matrix.matrix);
1618+
* console.log("Modified Matrix (Scaling):", matrix.matrix); // Output: [2, 4, 6, 8, 10, 12, 14, 16, 18]
16191619
*
16201620
* // Apply the modified matrix to the same vector
16211621
* const scaledVector = matrix.multiplyVec3(vector);
1622-
* console.log("Scaled Vector:", scaledVector.toString());
1622+
* console.log("Scaled Vector:", scaledVector.toString()); // Output: [60, 72, 84]
16231623
* }
16241624
* </code></div>
16251625
*/

0 commit comments

Comments
 (0)