diff --git a/amsmathutil25_vec_conversions.cpp.tmp b/amsmathutil25_vec_conversions.cpp.tmp index 3b538dd..5c13d1d 100644 --- a/amsmathutil25_vec_conversions.cpp.tmp +++ b/amsmathutil25_vec_conversions.cpp.tmp @@ -58,6 +58,7 @@ vec3::vec3(const vec2 rhs) { x = (double)rhs.x; y = (double)rhs.y; + z = 0; return; } @@ -65,6 +66,7 @@ vec3::vec3(const vec4 rhs) { x = (double)rhs.x; y = (double)rhs.y; + z = (double)rhs.z; return; } @@ -72,6 +74,7 @@ vec3::vec3(const vec2f rhs) { x = (double)rhs.x; y = (double)rhs.y; + z = 0; return; } @@ -79,6 +82,7 @@ vec3::vec3(const vec3f rhs) { x = (double)rhs.x; y = (double)rhs.y; + z = (double)rhs.z; return; } @@ -86,6 +90,7 @@ vec3::vec3(const vec4f rhs) { x = (double)rhs.x; y = (double)rhs.y; + z = (double)rhs.z; return; } @@ -93,6 +98,7 @@ vec3::vec3(const vec2i rhs) { x = (double)rhs.x; y = (double)rhs.y; + z = 0; return; } @@ -100,6 +106,7 @@ vec3::vec3(const vec3i rhs) { x = (double)rhs.x; y = (double)rhs.y; + z = (double)rhs.z; return; } @@ -107,6 +114,7 @@ vec3::vec3(const vec4i rhs) { x = (double)rhs.x; y = (double)rhs.y; + z = (double)rhs.z; return; } @@ -114,6 +122,8 @@ vec4::vec4(const vec2 rhs) { x = (double)rhs.x; y = (double)rhs.y; + z = 0; + w = 0; return; } @@ -121,6 +131,8 @@ vec4::vec4(const vec3 rhs) { x = (double)rhs.x; y = (double)rhs.y; + z = (double)rhs.z; + w = 0; return; } @@ -128,6 +140,8 @@ vec4::vec4(const vec2f rhs) { x = (double)rhs.x; y = (double)rhs.y; + z = 0; + w = 0; return; } @@ -135,6 +149,8 @@ vec4::vec4(const vec3f rhs) { x = (double)rhs.x; y = (double)rhs.y; + z = (double)rhs.z; + w = 0; return; } @@ -142,6 +158,8 @@ vec4::vec4(const vec4f rhs) { x = (double)rhs.x; y = (double)rhs.y; + z = (double)rhs.z; + w = (double)rhs.w; return; } @@ -149,6 +167,8 @@ vec4::vec4(const vec2i rhs) { x = (double)rhs.x; y = (double)rhs.y; + z = 0; + w = 0; return; } @@ -156,6 +176,8 @@ vec4::vec4(const vec3i rhs) { x = (double)rhs.x; y = (double)rhs.y; + z = (double)rhs.z; + w = 0; return; } @@ -163,6 +185,8 @@ vec4::vec4(const vec4i rhs) { x = (double)rhs.x; y = (double)rhs.y; + z = (double)rhs.z; + w = (double)rhs.w; return; } @@ -226,6 +250,7 @@ vec3f::vec3f(const vec2 rhs) { x = (float)rhs.x; y = (float)rhs.y; + z = 0; return; } @@ -233,6 +258,7 @@ vec3f::vec3f(const vec3 rhs) { x = (float)rhs.x; y = (float)rhs.y; + z = (float)rhs.z; return; } @@ -240,6 +266,7 @@ vec3f::vec3f(const vec4 rhs) { x = (float)rhs.x; y = (float)rhs.y; + z = (float)rhs.z; return; } @@ -247,6 +274,7 @@ vec3f::vec3f(const vec2f rhs) { x = (float)rhs.x; y = (float)rhs.y; + z = 0; return; } @@ -254,6 +282,7 @@ vec3f::vec3f(const vec4f rhs) { x = (float)rhs.x; y = (float)rhs.y; + z = (float)rhs.z; return; } @@ -261,6 +290,7 @@ vec3f::vec3f(const vec2i rhs) { x = (float)rhs.x; y = (float)rhs.y; + z = 0; return; } @@ -268,6 +298,7 @@ vec3f::vec3f(const vec3i rhs) { x = (float)rhs.x; y = (float)rhs.y; + z = (float)rhs.z; return; } @@ -275,6 +306,7 @@ vec3f::vec3f(const vec4i rhs) { x = (float)rhs.x; y = (float)rhs.y; + z = (float)rhs.z; return; } @@ -282,6 +314,8 @@ vec4f::vec4f(const vec2 rhs) { x = (float)rhs.x; y = (float)rhs.y; + z = 0; + w = 0; return; } @@ -289,6 +323,8 @@ vec4f::vec4f(const vec3 rhs) { x = (float)rhs.x; y = (float)rhs.y; + z = (float)rhs.z; + w = 0; return; } @@ -296,6 +332,8 @@ vec4f::vec4f(const vec4 rhs) { x = (float)rhs.x; y = (float)rhs.y; + z = (float)rhs.z; + w = (float)rhs.w; return; } @@ -303,6 +341,8 @@ vec4f::vec4f(const vec2f rhs) { x = (float)rhs.x; y = (float)rhs.y; + z = 0; + w = 0; return; } @@ -310,6 +350,8 @@ vec4f::vec4f(const vec3f rhs) { x = (float)rhs.x; y = (float)rhs.y; + z = (float)rhs.z; + w = 0; return; } @@ -317,6 +359,8 @@ vec4f::vec4f(const vec2i rhs) { x = (float)rhs.x; y = (float)rhs.y; + z = 0; + w = 0; return; } @@ -324,6 +368,8 @@ vec4f::vec4f(const vec3i rhs) { x = (float)rhs.x; y = (float)rhs.y; + z = (float)rhs.z; + w = 0; return; } @@ -331,6 +377,8 @@ vec4f::vec4f(const vec4i rhs) { x = (float)rhs.x; y = (float)rhs.y; + z = (float)rhs.z; + w = (float)rhs.w; return; } @@ -394,6 +442,7 @@ vec3i::vec3i(const vec2 rhs) { x = (int)rhs.x; y = (int)rhs.y; + z = 0; return; } @@ -401,6 +450,7 @@ vec3i::vec3i(const vec3 rhs) { x = (int)rhs.x; y = (int)rhs.y; + z = (int)rhs.z; return; } @@ -408,6 +458,7 @@ vec3i::vec3i(const vec4 rhs) { x = (int)rhs.x; y = (int)rhs.y; + z = (int)rhs.z; return; } @@ -415,6 +466,7 @@ vec3i::vec3i(const vec2f rhs) { x = (int)rhs.x; y = (int)rhs.y; + z = 0; return; } @@ -422,6 +474,7 @@ vec3i::vec3i(const vec3f rhs) { x = (int)rhs.x; y = (int)rhs.y; + z = (int)rhs.z; return; } @@ -429,6 +482,7 @@ vec3i::vec3i(const vec4f rhs) { x = (int)rhs.x; y = (int)rhs.y; + z = (int)rhs.z; return; } @@ -436,6 +490,7 @@ vec3i::vec3i(const vec2i rhs) { x = (int)rhs.x; y = (int)rhs.y; + z = 0; return; } @@ -443,6 +498,7 @@ vec3i::vec3i(const vec4i rhs) { x = (int)rhs.x; y = (int)rhs.y; + z = (int)rhs.z; return; } @@ -450,6 +506,8 @@ vec4i::vec4i(const vec2 rhs) { x = (int)rhs.x; y = (int)rhs.y; + z = 0; + w = 0; return; } @@ -457,6 +515,8 @@ vec4i::vec4i(const vec3 rhs) { x = (int)rhs.x; y = (int)rhs.y; + z = (int)rhs.z; + w = 0; return; } @@ -464,6 +524,8 @@ vec4i::vec4i(const vec4 rhs) { x = (int)rhs.x; y = (int)rhs.y; + z = (int)rhs.z; + w = (int)rhs.w; return; } @@ -471,6 +533,8 @@ vec4i::vec4i(const vec2f rhs) { x = (int)rhs.x; y = (int)rhs.y; + z = 0; + w = 0; return; } @@ -478,6 +542,8 @@ vec4i::vec4i(const vec3f rhs) { x = (int)rhs.x; y = (int)rhs.y; + z = (int)rhs.z; + w = 0; return; } @@ -485,6 +551,8 @@ vec4i::vec4i(const vec4f rhs) { x = (int)rhs.x; y = (int)rhs.y; + z = (int)rhs.z; + w = (int)rhs.w; return; } @@ -492,6 +560,8 @@ vec4i::vec4i(const vec2i rhs) { x = (int)rhs.x; y = (int)rhs.y; + z = 0; + w = 0; return; } @@ -499,6 +569,8 @@ vec4i::vec4i(const vec3i rhs) { x = (int)rhs.x; y = (int)rhs.y; + z = (int)rhs.z; + w = 0; return; } diff --git a/amsmathutil25_vec_conversions.hpp.tmp b/amsmathutil25_vec_conversions.hpp.tmp index 6d3597a..da846ad 100644 --- a/amsmathutil25_vec_conversions.hpp.tmp +++ b/amsmathutil25_vec_conversions.hpp.tmp @@ -1,81 +1,81 @@ -explicit vec2::vec2(const vec3 rhs); -explicit vec2::vec2(const vec4 rhs); -explicit vec2::vec2(const vec2f rhs); -explicit vec2::vec2(const vec3f rhs); -explicit vec2::vec2(const vec4f rhs); -explicit vec2::vec2(const vec2i rhs); -explicit vec2::vec2(const vec3i rhs); -explicit vec2::vec2(const vec4i rhs); +explicit vec2(const vec2 rhs); +explicit vec2(const vec2 rhs); +explicit vec2(const vec2 rhs); +explicit vec2(const vec2 rhs); +explicit vec2(const vec2 rhs); +explicit vec2(const vec2 rhs); +explicit vec2(const vec2 rhs); +explicit vec2(const vec2 rhs); -explicit vec3::vec3(const vec2 rhs); -explicit vec3::vec3(const vec4 rhs); -explicit vec3::vec3(const vec2f rhs); -explicit vec3::vec3(const vec3f rhs); -explicit vec3::vec3(const vec4f rhs); -explicit vec3::vec3(const vec2i rhs); -explicit vec3::vec3(const vec3i rhs); -explicit vec3::vec3(const vec4i rhs); +explicit vec3(const vec3 rhs); +explicit vec3(const vec3 rhs); +explicit vec3(const vec3 rhs); +explicit vec3(const vec3 rhs); +explicit vec3(const vec3 rhs); +explicit vec3(const vec3 rhs); +explicit vec3(const vec3 rhs); +explicit vec3(const vec3 rhs); -explicit vec4::vec4(const vec2 rhs); -explicit vec4::vec4(const vec3 rhs); -explicit vec4::vec4(const vec2f rhs); -explicit vec4::vec4(const vec3f rhs); -explicit vec4::vec4(const vec4f rhs); -explicit vec4::vec4(const vec2i rhs); -explicit vec4::vec4(const vec3i rhs); -explicit vec4::vec4(const vec4i rhs); +explicit vec4(const vec4 rhs); +explicit vec4(const vec4 rhs); +explicit vec4(const vec4 rhs); +explicit vec4(const vec4 rhs); +explicit vec4(const vec4 rhs); +explicit vec4(const vec4 rhs); +explicit vec4(const vec4 rhs); +explicit vec4(const vec4 rhs); -explicit vec2f::vec2f(const vec2 rhs); -explicit vec2f::vec2f(const vec3 rhs); -explicit vec2f::vec2f(const vec4 rhs); -explicit vec2f::vec2f(const vec3f rhs); -explicit vec2f::vec2f(const vec4f rhs); -explicit vec2f::vec2f(const vec2i rhs); -explicit vec2f::vec2f(const vec3i rhs); -explicit vec2f::vec2f(const vec4i rhs); +explicit vec2f(const vec2f rhs); +explicit vec2f(const vec2f rhs); +explicit vec2f(const vec2f rhs); +explicit vec2f(const vec2f rhs); +explicit vec2f(const vec2f rhs); +explicit vec2f(const vec2f rhs); +explicit vec2f(const vec2f rhs); +explicit vec2f(const vec2f rhs); -explicit vec3f::vec3f(const vec2 rhs); -explicit vec3f::vec3f(const vec3 rhs); -explicit vec3f::vec3f(const vec4 rhs); -explicit vec3f::vec3f(const vec2f rhs); -explicit vec3f::vec3f(const vec4f rhs); -explicit vec3f::vec3f(const vec2i rhs); -explicit vec3f::vec3f(const vec3i rhs); -explicit vec3f::vec3f(const vec4i rhs); +explicit vec3f(const vec3f rhs); +explicit vec3f(const vec3f rhs); +explicit vec3f(const vec3f rhs); +explicit vec3f(const vec3f rhs); +explicit vec3f(const vec3f rhs); +explicit vec3f(const vec3f rhs); +explicit vec3f(const vec3f rhs); +explicit vec3f(const vec3f rhs); -explicit vec4f::vec4f(const vec2 rhs); -explicit vec4f::vec4f(const vec3 rhs); -explicit vec4f::vec4f(const vec4 rhs); -explicit vec4f::vec4f(const vec2f rhs); -explicit vec4f::vec4f(const vec3f rhs); -explicit vec4f::vec4f(const vec2i rhs); -explicit vec4f::vec4f(const vec3i rhs); -explicit vec4f::vec4f(const vec4i rhs); +explicit vec4f(const vec4f rhs); +explicit vec4f(const vec4f rhs); +explicit vec4f(const vec4f rhs); +explicit vec4f(const vec4f rhs); +explicit vec4f(const vec4f rhs); +explicit vec4f(const vec4f rhs); +explicit vec4f(const vec4f rhs); +explicit vec4f(const vec4f rhs); -explicit vec2i::vec2i(const vec2 rhs); -explicit vec2i::vec2i(const vec3 rhs); -explicit vec2i::vec2i(const vec4 rhs); -explicit vec2i::vec2i(const vec2f rhs); -explicit vec2i::vec2i(const vec3f rhs); -explicit vec2i::vec2i(const vec4f rhs); -explicit vec2i::vec2i(const vec3i rhs); -explicit vec2i::vec2i(const vec4i rhs); +explicit vec2i(const vec2i rhs); +explicit vec2i(const vec2i rhs); +explicit vec2i(const vec2i rhs); +explicit vec2i(const vec2i rhs); +explicit vec2i(const vec2i rhs); +explicit vec2i(const vec2i rhs); +explicit vec2i(const vec2i rhs); +explicit vec2i(const vec2i rhs); -explicit vec3i::vec3i(const vec2 rhs); -explicit vec3i::vec3i(const vec3 rhs); -explicit vec3i::vec3i(const vec4 rhs); -explicit vec3i::vec3i(const vec2f rhs); -explicit vec3i::vec3i(const vec3f rhs); -explicit vec3i::vec3i(const vec4f rhs); -explicit vec3i::vec3i(const vec2i rhs); -explicit vec3i::vec3i(const vec4i rhs); +explicit vec3i(const vec3i rhs); +explicit vec3i(const vec3i rhs); +explicit vec3i(const vec3i rhs); +explicit vec3i(const vec3i rhs); +explicit vec3i(const vec3i rhs); +explicit vec3i(const vec3i rhs); +explicit vec3i(const vec3i rhs); +explicit vec3i(const vec3i rhs); -explicit vec4i::vec4i(const vec2 rhs); -explicit vec4i::vec4i(const vec3 rhs); -explicit vec4i::vec4i(const vec4 rhs); -explicit vec4i::vec4i(const vec2f rhs); -explicit vec4i::vec4i(const vec3f rhs); -explicit vec4i::vec4i(const vec4f rhs); -explicit vec4i::vec4i(const vec2i rhs); -explicit vec4i::vec4i(const vec3i rhs); +explicit vec4i(const vec4i rhs); +explicit vec4i(const vec4i rhs); +explicit vec4i(const vec4i rhs); +explicit vec4i(const vec4i rhs); +explicit vec4i(const vec4i rhs); +explicit vec4i(const vec4i rhs); +explicit vec4i(const vec4i rhs); +explicit vec4i(const vec4i rhs); diff --git a/build_linux64/libamsmathutil25.linux64.a b/build_linux64/libamsmathutil25.linux64.a index 6996fbd..8bd7bf8 100644 Binary files a/build_linux64/libamsmathutil25.linux64.a and b/build_linux64/libamsmathutil25.linux64.a differ diff --git a/build_linux64/objstore/amsmathutil25_vecconversions.o b/build_linux64/objstore/amsmathutil25_vecconversions.o index 93bba8f..cc4abab 100644 Binary files a/build_linux64/objstore/amsmathutil25_vecconversions.o and b/build_linux64/objstore/amsmathutil25_vecconversions.o differ diff --git a/include/amsmathutil25/math/genconversions.py b/include/amsmathutil25/math/genconversions.py index 7abc843..f6ca91b 100644 --- a/include/amsmathutil25/math/genconversions.py +++ b/include/amsmathutil25/math/genconversions.py @@ -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 diff --git a/src/amsmathutil25/math/amsmathutil25_vecconversions.cpp b/src/amsmathutil25/math/amsmathutil25_vecconversions.cpp index 2614dd8..a0399d3 100644 --- a/src/amsmathutil25/math/amsmathutil25_vecconversions.cpp +++ b/src/amsmathutil25/math/amsmathutil25_vecconversions.cpp @@ -2,511 +2,580 @@ namespace ams { - vec2::vec2(const vec3 rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec2::vec2(const vec4 rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec2::vec2(const vec2f rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec2::vec2(const vec3f rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec2::vec2(const vec4f rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec2::vec2(const vec2i rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec2::vec2(const vec3i rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec2::vec2(const vec4i rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec3::vec3(const vec2 rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec3::vec3(const vec4 rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec3::vec3(const vec2f rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec3::vec3(const vec3f rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec3::vec3(const vec4f rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec3::vec3(const vec2i rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec3::vec3(const vec3i rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec3::vec3(const vec4i rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec4::vec4(const vec2 rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec4::vec4(const vec3 rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec4::vec4(const vec2f rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec4::vec4(const vec3f rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec4::vec4(const vec4f rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec4::vec4(const vec2i rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec4::vec4(const vec3i rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec4::vec4(const vec4i rhs) -{ - x = (double)rhs.x; - y = (double)rhs.y; - return; -} - -vec2f::vec2f(const vec2 rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec2f::vec2f(const vec3 rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec2f::vec2f(const vec4 rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec2f::vec2f(const vec3f rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec2f::vec2f(const vec4f rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec2f::vec2f(const vec2i rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec2f::vec2f(const vec3i rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec2f::vec2f(const vec4i rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec3f::vec3f(const vec2 rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec3f::vec3f(const vec3 rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec3f::vec3f(const vec4 rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec3f::vec3f(const vec2f rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec3f::vec3f(const vec4f rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec3f::vec3f(const vec2i rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec3f::vec3f(const vec3i rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec3f::vec3f(const vec4i rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec4f::vec4f(const vec2 rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec4f::vec4f(const vec3 rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec4f::vec4f(const vec4 rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec4f::vec4f(const vec2f rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec4f::vec4f(const vec3f rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec4f::vec4f(const vec2i rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec4f::vec4f(const vec3i rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec4f::vec4f(const vec4i rhs) -{ - x = (float)rhs.x; - y = (float)rhs.y; - return; -} - -vec2i::vec2i(const vec2 rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec2i::vec2i(const vec3 rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec2i::vec2i(const vec4 rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec2i::vec2i(const vec2f rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec2i::vec2i(const vec3f rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec2i::vec2i(const vec4f rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec2i::vec2i(const vec3i rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec2i::vec2i(const vec4i rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec3i::vec3i(const vec2 rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec3i::vec3i(const vec3 rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec3i::vec3i(const vec4 rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec3i::vec3i(const vec2f rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec3i::vec3i(const vec3f rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec3i::vec3i(const vec4f rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec3i::vec3i(const vec2i rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec3i::vec3i(const vec4i rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec4i::vec4i(const vec2 rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec4i::vec4i(const vec3 rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec4i::vec4i(const vec4 rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec4i::vec4i(const vec2f rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec4i::vec4i(const vec3f rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec4i::vec4i(const vec4f rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec4i::vec4i(const vec2i rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - -vec4i::vec4i(const vec3i rhs) -{ - x = (int)rhs.x; - y = (int)rhs.y; - return; -} - - - + { + x = (double)rhs.x; + y = (double)rhs.y; + return; + } + + vec2::vec2(const vec4 rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + return; + } + + vec2::vec2(const vec2f rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + return; + } + + vec2::vec2(const vec3f rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + return; + } + + vec2::vec2(const vec4f rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + return; + } + + vec2::vec2(const vec2i rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + return; + } + + vec2::vec2(const vec3i rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + return; + } + + vec2::vec2(const vec4i rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + return; + } + + vec3::vec3(const vec2 rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + z = 0; + return; + } + + vec3::vec3(const vec4 rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + z = (double)rhs.z; + return; + } + + vec3::vec3(const vec2f rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + z = 0; + return; + } + + vec3::vec3(const vec3f rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + z = (double)rhs.z; + return; + } + + vec3::vec3(const vec4f rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + z = (double)rhs.z; + return; + } + + vec3::vec3(const vec2i rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + z = 0; + return; + } + + vec3::vec3(const vec3i rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + z = (double)rhs.z; + return; + } + + vec3::vec3(const vec4i rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + z = (double)rhs.z; + return; + } + + vec4::vec4(const vec2 rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + z = 0; + w = 0; + return; + } + + vec4::vec4(const vec3 rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + z = (double)rhs.z; + w = 0; + return; + } + + vec4::vec4(const vec2f rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + z = 0; + w = 0; + return; + } + + vec4::vec4(const vec3f rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + z = (double)rhs.z; + w = 0; + return; + } + + vec4::vec4(const vec4f rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + z = (double)rhs.z; + w = (double)rhs.w; + return; + } + + vec4::vec4(const vec2i rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + z = 0; + w = 0; + return; + } + + vec4::vec4(const vec3i rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + z = (double)rhs.z; + w = 0; + return; + } + + vec4::vec4(const vec4i rhs) + { + x = (double)rhs.x; + y = (double)rhs.y; + z = (double)rhs.z; + w = (double)rhs.w; + return; + } + + vec2f::vec2f(const vec2 rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + return; + } + + vec2f::vec2f(const vec3 rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + return; + } + + vec2f::vec2f(const vec4 rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + return; + } + + vec2f::vec2f(const vec3f rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + return; + } + + vec2f::vec2f(const vec4f rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + return; + } + + vec2f::vec2f(const vec2i rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + return; + } + + vec2f::vec2f(const vec3i rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + return; + } + + vec2f::vec2f(const vec4i rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + return; + } + + vec3f::vec3f(const vec2 rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + z = 0; + return; + } + + vec3f::vec3f(const vec3 rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + z = (float)rhs.z; + return; + } + + vec3f::vec3f(const vec4 rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + z = (float)rhs.z; + return; + } + + vec3f::vec3f(const vec2f rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + z = 0; + return; + } + + vec3f::vec3f(const vec4f rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + z = (float)rhs.z; + return; + } + + vec3f::vec3f(const vec2i rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + z = 0; + return; + } + + vec3f::vec3f(const vec3i rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + z = (float)rhs.z; + return; + } + + vec3f::vec3f(const vec4i rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + z = (float)rhs.z; + return; + } + + vec4f::vec4f(const vec2 rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + z = 0; + w = 0; + return; + } + + vec4f::vec4f(const vec3 rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + z = (float)rhs.z; + w = 0; + return; + } + + vec4f::vec4f(const vec4 rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + z = (float)rhs.z; + w = (float)rhs.w; + return; + } + + vec4f::vec4f(const vec2f rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + z = 0; + w = 0; + return; + } + + vec4f::vec4f(const vec3f rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + z = (float)rhs.z; + w = 0; + return; + } + + vec4f::vec4f(const vec2i rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + z = 0; + w = 0; + return; + } + + vec4f::vec4f(const vec3i rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + z = (float)rhs.z; + w = 0; + return; + } + + vec4f::vec4f(const vec4i rhs) + { + x = (float)rhs.x; + y = (float)rhs.y; + z = (float)rhs.z; + w = (float)rhs.w; + return; + } + + vec2i::vec2i(const vec2 rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + return; + } + + vec2i::vec2i(const vec3 rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + return; + } + + vec2i::vec2i(const vec4 rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + return; + } + + vec2i::vec2i(const vec2f rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + return; + } + + vec2i::vec2i(const vec3f rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + return; + } + + vec2i::vec2i(const vec4f rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + return; + } + + vec2i::vec2i(const vec3i rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + return; + } + + vec2i::vec2i(const vec4i rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + return; + } + + vec3i::vec3i(const vec2 rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + z = 0; + return; + } + + vec3i::vec3i(const vec3 rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + z = (int)rhs.z; + return; + } + + vec3i::vec3i(const vec4 rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + z = (int)rhs.z; + return; + } + + vec3i::vec3i(const vec2f rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + z = 0; + return; + } + + vec3i::vec3i(const vec3f rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + z = (int)rhs.z; + return; + } + + vec3i::vec3i(const vec4f rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + z = (int)rhs.z; + return; + } + + vec3i::vec3i(const vec2i rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + z = 0; + return; + } + + vec3i::vec3i(const vec4i rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + z = (int)rhs.z; + return; + } + + vec4i::vec4i(const vec2 rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + z = 0; + w = 0; + return; + } + + vec4i::vec4i(const vec3 rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + z = (int)rhs.z; + w = 0; + return; + } + + vec4i::vec4i(const vec4 rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + z = (int)rhs.z; + w = (int)rhs.w; + return; + } + + vec4i::vec4i(const vec2f rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + z = 0; + w = 0; + return; + } + + vec4i::vec4i(const vec3f rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + z = (int)rhs.z; + w = 0; + return; + } + + vec4i::vec4i(const vec4f rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + z = (int)rhs.z; + w = (int)rhs.w; + return; + } + + vec4i::vec4i(const vec2i rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + z = 0; + w = 0; + return; + } + + vec4i::vec4i(const vec3i rhs) + { + x = (int)rhs.x; + y = (int)rhs.y; + z = (int)rhs.z; + w = 0; + return; + } + }; \ No newline at end of file