Skip to content

Commit 66c4470

Browse files
committed
p5.Matrix add orhto comments logs
1 parent 668934c commit 66c4470

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/math/Matrices/Matrix.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,16 +1324,18 @@ export class Matrix extends MatrixInterface {
13241324
* <div class="norender"><code>
13251325
* // Example using p5.js to demonstrate orthographic projection
13261326
* function setup() {
1327-
* let orthoMatrix = new p5.Matrix(4);
1328-
* orthoMatrix.ortho(-200, 200, -200, 200, 0.1, 1000);
1329-
* applyMatrix(
1327+
* let orthoMatrix = new p5.Matrix(4);
1328+
* console.log(orthoMatrix.matrix.toString()) // Output: 1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1
1329+
* orthoMatrix.ortho(-200, 200, -200, 200, 0.1, 1000);
1330+
* console.log(orthoMatrix.matrix.toString()) // Output: [24 0.004999999888241291,0,0,0,0,0.004999999888241291,0,0,0,0,-0.0020002000965178013,0,0,0,-1.0002000331878662,1]
1331+
* applyMatrix(
13301332
* orthoMatrix.mat4[0], orthoMatrix.mat4[1], orthoMatrix.mat4[2], orthoMatrix.mat4[3],
13311333
* orthoMatrix.mat4[4], orthoMatrix.mat4[5], orthoMatrix.mat4[6], orthoMatrix.mat4[7],
13321334
* orthoMatrix.mat4[8], orthoMatrix.mat4[9], orthoMatrix.mat4[10], orthoMatrix.mat4[11],
13331335
* orthoMatrix.mat4[12], orthoMatrix.mat4[13], orthoMatrix.mat4[14], orthoMatrix.mat4[15]
1334-
* );
1335-
* }
1336-
*
1336+
* );
1337+
* console.log(orthoMatrix.matrix.toString()) // Output: [31 0.004999999888241291,0,0,0,0,0.004999999888241291,0,0,0,0,-0.0020002000965178013,0,0,0,-1.0002000331878662,1]
1338+
* }
13371339
* </code></div>
13381340
*
13391341
*/

0 commit comments

Comments
 (0)