Skip to content

Instantly share code, notes, and snippets.

@BitPuffin
Created December 5, 2013 12:54
Show Gist options
  • Save BitPuffin/7804696 to your computer and use it in GitHub Desktop.
Save BitPuffin/7804696 to your computer and use it in GitHub Desktop.
proc identity[T; N](): TMatrix[T, N, N] {.noSideEffect.} =
for i in N.low..N.high():
result[i][i] = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment