Merge pull request #55 from treeform/dev

Fix to work around --mm:arc bug.
This commit is contained in:
Andre von Houck 2022-07-08 16:55:08 -07:00 committed by GitHub
commit 78ca669521
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -861,7 +861,8 @@ type
DMat4* = GMat4[float64] DMat4* = GMat4[float64]
proc matToString[T](a: T, n: int): string = proc matToString[T](a: T, n: int): string =
result.add ($type(a)).toLowerAscii() & "(\n" result = ($type(a)).toLowerAscii()
result.add "(\n"
for x in 0 ..< n: for x in 0 ..< n:
result.add " " result.add " "
for y in 0 ..< n: for y in 0 ..< n:

View file

@ -868,8 +868,6 @@ block:
doAssert `zmod`(vec3(12, 6, 18), vec3(6, 12, 7)) == vec3(0, 6, 4) doAssert `zmod`(vec3(12, 6, 18), vec3(6, 12, 7)) == vec3(0, 6, 4)
doAssert `zmod`(vec4(12, 6, 18, 16), vec4(6, 12, 7, 15)) == vec4(0, 6, 4, 1) doAssert `zmod`(vec4(12, 6, 18, 16), vec4(6, 12, 7, 15)) == vec4(0, 6, 4, 1)
echo "test finished successfully"
block: block:
doAssert vec2(1, 1) == vec2(1, 1) doAssert vec2(1, 1) == vec2(1, 1)
doAssert dvec2(2, 2) == dvec2(2, 2) doAssert dvec2(2, 2) == dvec2(2, 2)
@ -939,3 +937,5 @@ block:
var b: Vec2 var b: Vec2
b = a / 2 b = a / 2
when compiles(b = a div 2): doAssert false # type mismatch when compiles(b = a div 2): doAssert false # type mismatch
echo "test finished successfully"