-
-
Save barcharcraz/8a6d216f7f072fb62984 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| type TMatrix*[N: static[int]; M: static[int]; T] = object | |
| data*: array[0..M*N-1, T] | |
| type TVec3f*[N: static[int]; T] = TMatrix[N, 1, T] | |
| proc `$`*(a: TVec3f): string {.noSideEffect.} = | |
| result = "x: " & formatFloat(a[1]) | |
| result &= " y: " & formatFloat(a[2]) | |
| result &= " z: " & formatFloat(a[3]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment