From a9c1274aa8cfac452ce7ea2791e9e7469ccb14bb Mon Sep 17 00:00:00 2001 From: cha0s Date: Sun, 8 Sep 2019 03:20:34 -0500 Subject: [PATCH] chore: incremental port --- packages/math/matrix.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/math/matrix.js b/packages/math/matrix.js index b0489bf..c38ff1c 100644 --- a/packages/math/matrix.js +++ b/packages/math/matrix.js @@ -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]