Created
December 5, 2013 13:06
-
-
Save BitPuffin/7804860 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template identity(m: typedesc[TMatrix]): expr = | |
when m.R != m.C: | |
{.fatal: "Identity is only defined for square matrices".} | |
result = identity[m.T, m.R]() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment