fix setters in swizzle

This commit is contained in:
levovix0 2022-06-05 17:09:16 +03:00
parent 8b85bef504
commit 3be5d965e2
2 changed files with 2022 additions and 1011 deletions

File diff suppressed because it is too large Load diff

View file

@ -18,7 +18,8 @@ for swizzle in swizzles:
echo &" let a2 = a"
echo &" gvec2(a2[{i1}], a2[{i2}])"
echo &"func `{s1}{s2}=`*[T](a: var GVec234[T], b: GVec2[T]) ="
echo &" a[{i1}] = b.x; a[{i2}] = b.y"
echo &" let b2 = b"
echo &" a[{i1}] = b2.x; a[{i2}] = b2.y"
for swizzle in swizzles:
echo "\n# 3 x ", swizzle
@ -29,7 +30,8 @@ for swizzle in swizzles:
echo &" let a2 = a"
echo &" gvec3(a2[{i1}], a2[{i2}], a2[{i3}])"
echo &"func `{s1}{s2}{s3}=`*[T](a: var GVec234[T], b: GVec3[T]) ="
echo &" a[{i1}] = b.x; a[{i2}] = b.y; a[{i3}] = b.z"
echo &" let b2 = b"
echo &" a[{i1}] = b2.x; a[{i2}] = b2.y; a[{i3}] = b2.z"
for swizzle in swizzles:
echo "\n# 4 x ", swizzle
@ -41,4 +43,5 @@ for swizzle in swizzles:
echo &" let a2 = a"
echo &" gvec4(a2[{i1}], a2[{i2}], a2[{i3}], a2[{i4}])"
echo &"func `{s1}{s2}{s3}{s4}=`*[T](a: var GVec234[T], b: GVec4[T]) ="
echo &" a[{i1}] = b.x; a[{i2}] = b.y; a[{i3}] = b.z; a[{i4}] = b.w"
echo &" let b2 = b"
echo &" a[{i1}] = b2.x; a[{i2}] = b2.y; a[{i3}] = b2.z; a[{i4}] = b2.w"