added vector interconversions

This commit is contained in:
2026-03-11 14:28:15 -04:00
parent 4fe50d12d0
commit 0003a9d6d2
6 changed files with 724 additions and 583 deletions

View File

@ -31,13 +31,13 @@ for I in range(0,len(dtype)):
body += "{\n"
body += " x = ({})rhs.x;\n".format(convtxt[I])
body += " y = ({})rhs.y;\n".format(convtxt[I])
if(J>=3):
if(L>=3):
if(dim[J]>=3):
if(dim[L]>=3):
body += " z = ({})rhs.z;\n".format(convtxt[I])
else:
body += " z = 0;\n".format(convtxt[I])
if(J>=4):
if(L>=4):
if(dim[J]>=4):
if(dim[L]>=4):
body += " w = ({})rhs.w;\n".format(convtxt[I])
else:
body += " w = 0;\n".format(convtxt[I])
@ -45,7 +45,7 @@ for I in range(0,len(dtype)):
body += "}\n\n"
head = "explicit {}::{}(const {} rhs);\n".format(ttxt,ttxt,ftxt)
head = "explicit {}(const {} rhs);\n".format(ttxt,ttxt,ftxt)
headertxt+=head
bodytxt+=body