From 1d87ef2303e77b195bbcda97b2674b73af6082a5 Mon Sep 17 00:00:00 2001 From: neviyn Date: Sun, 8 Nov 2020 21:00:27 +0000 Subject: [PATCH] Made more Matrix operations exportable --- src/matrix.nim | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/matrix.nim b/src/matrix.nim index 2bdd4fa..1623bd1 100644 --- a/src/matrix.nim +++ b/src/matrix.nim @@ -61,19 +61,19 @@ proc `*`*(lhs: Matrix, rhs: Tuple4): Tuple4 = (lhs * matrix(rhs)).toTuple4() template isSquare(mat: Matrix): bool = mat.height == mat.width and len(mat.matrix) == (mat.height * mat.width) -proc identity(size: int): Matrix = +proc identity*(size: int): Matrix = result.width = size result.height = size result.matrix = newSeq[float](size * size) for i in 0..