chore: incremental port
This commit is contained in:
parent
1f7763e715
commit
a9c1274aa8
|
@ -4,9 +4,9 @@
|
|||
// matrix is implemented as an n-element array. Data is stored in row-major
|
||||
// order.
|
||||
|
||||
export copy = (matrix) => matrix.map((row) => [...row])
|
||||
export const copy = (matrix) => matrix.map((row) => [...row])
|
||||
|
||||
export equals = (l, r) ->
|
||||
export const equals = (l, r) =>
|
||||
|
||||
return false unless l.length is r.length
|
||||
return true if l.length is 0
|
||||
|
@ -20,12 +20,12 @@ export equals = (l, r) ->
|
|||
|
||||
return true
|
||||
|
||||
export size = (matrix) ->
|
||||
export const size = (matrix) =>
|
||||
|
||||
return 0 if 0 is matrix.length
|
||||
return matrix.length * matrix[0].length
|
||||
|
||||
export sizeVector = (matrix) ->
|
||||
export const sizeVector = (matrix) =>
|
||||
|
||||
return [0, 0] if 0 is matrix.length
|
||||
return [matrix[0].length, matrix.length]
|
||||
|
|
Loading…
Reference in New Issue
Block a user