@@ -79,38 +79,38 @@ function matrix() {
7979 setReadOnly ( mat , 'get' , get ) ;
8080 setReadOnly ( mat , 'set' , set ) ;
8181 return mat ;
82+ }
8283
83- /**
84- * Returns a matrix element based on the provided row and column indices.
85- *
86- * @private
87- * @param {integer } i - row index
88- * @param {integer } j - column index
89- * @returns {(number|undefined) } matrix element
90- */
91- function get ( i , j ) {
92- /* eslint-disable no-invalid-this */
93- var idx = this . offset + ( i * this . strides [ 0 ] ) + ( j * this . strides [ 1 ] ) ;
94- return this . data [ idx ] ;
95- }
84+ /**
85+ * Returns a matrix element based on the provided row and column indices.
86+ *
87+ * @private
88+ * @param {integer } i - row index
89+ * @param {integer } j - column index
90+ * @returns {(number|undefined) } matrix element
91+ */
92+ function get ( i , j ) {
93+ /* eslint-disable no-invalid-this */
94+ var idx = this . offset + ( i * this . strides [ 0 ] ) + ( j * this . strides [ 1 ] ) ;
95+ return this . data [ idx ] ;
96+ }
9697
97- /**
98- * Sets a matrix element based on the provided row and column indices.
99- *
100- * @private
101- * @param {integer } i - row index
102- * @param {integer } j - column index
103- * @param {number } v - value to set
104- * @returns {Matrix } Matrix instance
105- */
106- function set ( i , j , v ) {
107- /* eslint-disable no-invalid-this */
108- i = this . offset + ( i * this . strides [ 0 ] ) + ( j * this . strides [ 1 ] ) ;
109- if ( i >= 0 ) {
110- this . data [ i ] = v ;
111- }
112- return this ;
98+ /**
99+ * Sets a matrix element based on the provided row and column indices.
100+ *
101+ * @private
102+ * @param {integer } i - row index
103+ * @param {integer } j - column index
104+ * @param {number } v - value to set
105+ * @returns {Matrix } Matrix instance
106+ */
107+ function set ( i , j , v ) {
108+ /* eslint-disable no-invalid-this */
109+ i = this . offset + ( i * this . strides [ 0 ] ) + ( j * this . strides [ 1 ] ) ;
110+ if ( i >= 0 ) {
111+ this . data [ i ] = v ;
113112 }
113+ return this ;
114114}
115115
116116
0 commit comments