tmatrix1.nim 409 B

1234567891011121314151617181920
  1. discard """
  2. output: "right proc called"
  3. """
  4. type
  5. TMatrixNM*[M, N, T] = object
  6. aij*: array[M, array[N, T]]
  7. TMatrix2x2*[T] = TMatrixNM[range[0..1], range[0..1], T]
  8. TMatrix3x3*[T] = TMatrixNM[range[0..2], range[0..2], T]
  9. proc test*[T](matrix: TMatrix2x2[T]) =
  10. echo "wrong proc called"
  11. proc test*[T](matrix: TMatrix3x3[T]) =
  12. echo "right proc called"
  13. var matrix: TMatrix3x3[float]
  14. matrix.test