summary refs log tree commit diff stats
path: root/tests/metatype/tmatrix3.nim
blob: 28e85fcee70dbf17a8a8f2ea22e50c8f0b0d2ffe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
discard """
  output: "\n"
"""

type Matrix[M,N: static[int]] = array[M, array[N, float]]

let a = [[1.0,  1.0,  1.0,   1.0],
         [2.0,  4.0,  8.0,  16.0],
         [3.0,  9.0, 27.0,  81.0],
         [4.0, 16.0, 64.0, 256.0]]

proc `$`(m: Matrix): string =
  result = ""

proc `*`[M,N,M2,N2](a: Matrix[M,N2]; b: Matrix[M2,N]): Matrix[M,N] =
  discard

echo a * a