#include <boost/test/unit_test.hpp>

#define VMATH_CORE_SWIZZLE_ENABLE_ELEMENT_ACCESSORS
#include <vmath/core/vector.hpp>
#include <vmath/core/swizzle/swizzle4.hpp>

BOOST_AUTO_TEST_SUITE(swizzle4)

BOOST_AUTO_TEST_CASE(negate_op) {
	vmath::core::Vector<float, 4> V;
	V.x = 20.12f;
	V.y = 100.89f;
	V.z = -18.2f;
	V.w = 35.62f;
	vmath::core::Vector<float, 4> V_neg;
	V_neg = -V.yzxx;
	BOOST_CHECK_CLOSE(V_neg.x, -100.89f, 1e-4f);
	BOOST_CHECK_CLOSE(V_neg.y, 18.2f, 1e-4f);
	BOOST_CHECK_CLOSE(V_neg.z, -20.12f, 1e-4f);
	BOOST_CHECK_CLOSE(V_neg.w, -20.12f, 1e-4f);
}

BOOST_AUTO_TEST_CASE(add_op) {
	vmath::core::Vector<float, 4> V1;
	V1.x = 20.12f;
	V1.y = 100.89f;
	V1.z = -18.2f;
	V1.w = 35.62f;
	vmath::core::Vector<float, 4> V2;
	V2.x = 10.34f;
	V2.y = -15.5f;
	V2.z = 20.2f;
	V2.w = -200.34f;
	vmath::core::Vector<float, 4> V_add;
	V_add = V1.yxyx + V2.xxxx;
	BOOST_CHECK_CLOSE(V_add.x, 111.23f, 1e-4f);
	BOOST_CHECK_CLOSE(V_add.y, 30.46f, 1e-4f);
	BOOST_CHECK_CLOSE(V_add.z, 111.23f, 1e-4f);
	BOOST_CHECK_CLOSE(V_add.w, 30.46f, 1e-4f);
	V_add = V2.xxxx + V1.yxyx;
	BOOST_CHECK_CLOSE(V_add.x, 111.23f, 1e-4f);
	BOOST_CHECK_CLOSE(V_add.y, 30.46f, 1e-4f);
	BOOST_CHECK_CLOSE(V_add.x, 111.23f, 1e-4f);
	BOOST_CHECK_CLOSE(V_add.w, 30.46f, 1e-4f);
}

BOOST_AUTO_TEST_CASE(add_eq_op) {
	vmath::core::Vector<float, 4> V1;
	V1.x = 20.12f;
	V1.y = 100.89f;
	V1.z = -18.2f;
	V1.w = 35.62f;
	vmath::core::Vector<float, 4> V2;
	V2.x = 10.34f;
	V2.y = -15.5f;
	V2.z = 20.2f;
	V2.w = -200.34f;
	vmath::core::Vector<float, 4> V_add = V1;
	V_add.yxzw += V2.xxxx;
	BOOST_CHECK_CLOSE(V_add.x, 30.46f, 1e-4f);
	BOOST_CHECK_CLOSE(V_add.y, 111.23f, 1e-4f);
	BOOST_CHECK_CLOSE(V_add.z, -7.859999999f, 1e-4f);
	BOOST_CHECK_CLOSE(V_add.w, 45.96f, 1e-4f);
}

BOOST_AUTO_TEST_CASE(sub_op) {
	vmath::core::Vector<float, 4> V1;
	V1.x = 20.12f;
	V1.y = 100.89f;
	V1.z = -18.2f;
	V1.w = 35.62f;
	vmath::core::Vector<float, 4> V2;
	V2.x = 10.34f;
	V2.y = -15.5f;
	V2.z = 20.12f;
	V2.w = -200.34f;
	vmath::core::Vector<float, 4> V_sub;
	V_sub = V1.yxxx - V2.xxzx;
	BOOST_CHECK_CLOSE(V_sub.x, 90.55f, 1e-4f);
	BOOST_CHECK_CLOSE(V_sub.y, 9.78f, 1e-4f);
	BOOST_CHECK_SMALL(V_sub.z, 1e-7f);
	BOOST_CHECK_CLOSE(V_sub.w, 9.78f, 1e-4f);
	V_sub = V2.xxzx - V1.yxxx;
	BOOST_CHECK_CLOSE(V_sub.x, -90.55f, 1e-4f);
	BOOST_CHECK_CLOSE(V_sub.y, -9.78f, 1e-4f);
	BOOST_CHECK_SMALL(V_sub.z, 1e-7f);
	BOOST_CHECK_CLOSE(V_sub.w, -9.78f, 1e-4f);
}

BOOST_AUTO_TEST_CASE(sub_eq_op) {
	vmath::core::Vector<float, 4> V1;
	V1.x = 20.12f;
	V1.y = 100.89f;
	V1.z = -18.2f;
	V1.w = 35.62f;
	vmath::core::Vector<float, 4> V2;
	V2.x = 10.34f;
	V2.y = -15.5f;
	V2.z = 20.2f;
	V2.w = -200.34f;
	vmath::core::Vector<float, 4> V_sub = V1;
	V_sub.yxwz -= V2.xxxx;
	BOOST_CHECK_CLOSE(V_sub.x, 9.78f, 1e-4f);
	BOOST_CHECK_CLOSE(V_sub.y, 90.55f, 1e-4f);
	BOOST_CHECK_CLOSE(V_sub.z, -28.54f, 1e-4f);
	BOOST_CHECK_CLOSE(V_sub.w, 25.28f, 1e-4f);
}

BOOST_AUTO_TEST_CASE(mult_op) {
	vmath::core::Vector<float, 4> V1;
	V1.x = 20.12f;
	V1.y = 100.89f;
	V1.z = -18.2f;
	V1.w = 35.62f;
	vmath::core::Vector<float, 4> V2;
	V2.x = 10.34f;
	V2.y = -15.5f;
	V2.z = 20.2f;
	V2.w = -200.34f;
	vmath::core::Vector<float, 4> V_mult;
	V_mult = V1.yxxx * V2.xxxx;
	BOOST_CHECK_CLOSE(V_mult.x, 1043.2026f, 1e-4f);
	BOOST_CHECK_CLOSE(V_mult.y, 208.0408f, 1e-4f);
	BOOST_CHECK_CLOSE(V_mult.z, 208.0408f, 1e-4f);
	BOOST_CHECK_CLOSE(V_mult.w, 208.0408f, 1e-4f);
	V_mult = V2.xxxx * V1.yxxx;
	BOOST_CHECK_CLOSE(V_mult.x, 1043.2026f, 1e-4f);
	BOOST_CHECK_CLOSE(V_mult.y, 208.0408f, 1e-4f);
	BOOST_CHECK_CLOSE(V_mult.z, 208.0408f, 1e-4f);
	BOOST_CHECK_CLOSE(V_mult.w, 208.0408f, 1e-4f);
}

BOOST_AUTO_TEST_CASE(mult_eq_op) {
	vmath::core::Vector<float, 4> V1;
	V1.x = 20.12f;
	V1.y = 100.89f;
	V1.z = -18.2f;
	V1.w = 35.62f;
	vmath::core::Vector<float, 4> V2;
	V2.x = 10.34f;
	V2.y = -15.5f;
	V2.z = 20.2f;
	V2.w = -200.34f;
	vmath::core::Vector<float, 4> V_mult = V1;
	V_mult.yxzw *= V2.xyxx;
	BOOST_CHECK_CLOSE(V_mult.x, -311.86f, 1e-4f);
	BOOST_CHECK_CLOSE(V_mult.y, 1043.2026f, 1e-4f);
	BOOST_CHECK_CLOSE(V_mult.z, -188.188f, 1e-4f);
	BOOST_CHECK_CLOSE(V_mult.w, 368.3108f, 1e-4f);
}

BOOST_AUTO_TEST_CASE(div_op) {
	vmath::core::Vector<float, 4> V1;
	V1.x = 20.0f;
	V1.y = 40.0f;
	V1.z = 60.0f;
	V1.w = 80.0f;
	vmath::core::Vector<float, 4> V2;
	V2.x = 2.0f;
	V2.y = 4.0f;
	V2.z = 6.0f;
	V2.z = 8.0f;
	vmath::core::Vector<float, 4> V_div;
	V_div = V1.yxxz / V2.xxxz;
	BOOST_CHECK_CLOSE(V_div.x, 20.0f, 1e-4f);
	BOOST_CHECK_CLOSE(V_div.y, 10.0f, 1e-4f);
	BOOST_CHECK_CLOSE(V_div.z, 10.0f, 1e-4f);
	BOOST_CHECK_CLOSE(V_div.z, 10.0f, 1e-4f);
	V_div = V1.xxxx / V2.yxxy;
	BOOST_CHECK_CLOSE(V_div.x, 5.0f, 1e-4f);
	BOOST_CHECK_CLOSE(V_div.y, 10.0f, 1e-4f);
	BOOST_CHECK_CLOSE(V_div.z, 10.0f, 1e-4f);
	BOOST_CHECK_CLOSE(V_div.w, 5.0f, 1e-4f);
}

BOOST_AUTO_TEST_CASE(div_eq_op) {
	vmath::core::Vector<float, 4> V1;
	V1.x = 20.0f;
	V1.y = 40.0f;
	V1.z = 60.0f;
	V1.w = 80.0f;
	vmath::core::Vector<float, 4> V2;
	V2.x = 2.0f;
	V2.y = 4.0f;
	V2.z = 6.0f;
	V2.w = 8.0f;
	vmath::core::Vector<float, 4> V_div = V1;
	V_div.yxzw /= V2.yxxx;
	BOOST_CHECK_CLOSE(V_div.x, 10.0f, 1e-4f);
	BOOST_CHECK_CLOSE(V_div.y, 10.0f, 1e-4f);
	BOOST_CHECK_CLOSE(V_div.z, 30.0f, 1e-4f);
	BOOST_CHECK_CLOSE(V_div.w, 40.0f, 1e-4f);
}

BOOST_AUTO_TEST_CASE(scalar_mult_op) {
	vmath::core::Vector<float, 4> V;
	V.x = 20.12f;
	V.y = 100.89f;
	V.z = -18.2f;
	V.w = 35.62f;
	float s = -34.45f;
	vmath::core::Vector<float, 4> V_mult;
	V_mult = V.xyzw * s;
	BOOST_CHECK_CLOSE(V_mult.x, -693.134f, 1e-4f);
	BOOST_CHECK_CLOSE(V_mult.y, -3475.6605f, 1e-4f);
	BOOST_CHECK_CLOSE(V_mult.z, 626.99f, 1e-4f);
	BOOST_CHECK_CLOSE(V_mult.w, -1227.109f, 1e-4f);
}

BOOST_AUTO_TEST_CASE(scalar_mult_eq_op) {
	vmath::core::Vector<float, 4> V;
	V.x = 20.12f;
	V.y = 100.89f;
	V.z = -18.2f;
	V.w = 35.62f;
	float s = -34.45f;
	vmath::core::Vector<float, 4> V_mult = V;
	V_mult.xyzw *= s;
	BOOST_CHECK_CLOSE(V_mult.x, -693.134f, 1e-4f);
	BOOST_CHECK_CLOSE(V_mult.y, -3475.6605f, 1e-4f);
	BOOST_CHECK_CLOSE(V_mult.z, 626.99f, 1e-4f);
	BOOST_CHECK_CLOSE(V_mult.w, -1227.109f, 1e-4f);
}

BOOST_AUTO_TEST_CASE(scalar_div_op) {
	vmath::core::Vector<float, 4> V;
	V.x = 20.12f;
	V.y = 100.89f;
	V.z = -18.2f;
	V.w = 35.62f;
	float s = -34.45f;
	vmath::core::Vector<float, 4> V_div;
	V_div = V.xyzw / s;
	BOOST_CHECK_CLOSE(V_div.x, -0.5840348330914369f, 1e-4f);
	BOOST_CHECK_CLOSE(V_div.y, -2.9285921625544264f, 1e-4f);
	BOOST_CHECK_CLOSE(V_div.z, 0.5283018867924527f, 1e-4f);
	BOOST_CHECK_CLOSE(V_div.w, -1.0339622641509432f, 1e-4f);
}

BOOST_AUTO_TEST_CASE(scalar_div_eq_op) {
	vmath::core::Vector<float, 4> V;
	V.x = 20.12f;
	V.y = 100.89f;
	V.z = -18.2f;
	V.w = 35.62f;
	float s = -34.45f;
	vmath::core::Vector<float, 4> V_div = V;
	V_div.xyzw /= s;
	BOOST_CHECK_CLOSE(V_div.x, -0.5840348330914369f, 1e-4f);
	BOOST_CHECK_CLOSE(V_div.y, -2.9285921625544264f, 1e-4f);
	BOOST_CHECK_CLOSE(V_div.z, 0.5283018867924527f, 1e-4f);
	BOOST_CHECK_CLOSE(V_div.w, -1.0339622641509432f, 1e-4f);
}

BOOST_AUTO_TEST_CASE(swizzles) {
	vmath::core::Vector<float, 4> V;
	V.x = 20.12f;
	V.y = 100.89f;
	V.z = -18.2f;
	// 2d swizzles <x, y, z, w>
	auto xx = V.xx;
	BOOST_CHECK_CLOSE(xx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xx.getE2(), V.x, 1e-4f);
	auto xy = V.xy;
	BOOST_CHECK_CLOSE(xy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xy.getE2(), V.y, 1e-4f);
	auto xz = V.xz;
	BOOST_CHECK_CLOSE(xz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xz.getE2(), V.z, 1e-4f);
	auto xw = V.xw;
	BOOST_CHECK_CLOSE(xw.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xw.getE2(), V.w, 1e-4f);
	auto yx = V.yx;
	BOOST_CHECK_CLOSE(yx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yx.getE2(), V.x, 1e-4f);
	auto yy = V.yy;
	BOOST_CHECK_CLOSE(yy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yy.getE2(), V.y, 1e-4f);
	auto yz = V.yz;
	BOOST_CHECK_CLOSE(yz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yz.getE2(), V.z, 1e-4f);
	auto yw = V.yw;
	BOOST_CHECK_CLOSE(yw.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yw.getE2(), V.w, 1e-4f);
	auto zx = V.zx;
	BOOST_CHECK_CLOSE(zx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zx.getE2(), V.x, 1e-4f);
	auto zy = V.zy;
	BOOST_CHECK_CLOSE(zy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zy.getE2(), V.y, 1e-4f);
	auto zz = V.zz;
	BOOST_CHECK_CLOSE(zz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zz.getE2(), V.z, 1e-4f);
	auto zw = V.zw;
	BOOST_CHECK_CLOSE(zw.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zw.getE2(), V.w, 1e-4f);
	auto wx = V.wx;
	BOOST_CHECK_CLOSE(wx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wx.getE2(), V.x, 1e-4f);
	auto wy = V.wy;
	BOOST_CHECK_CLOSE(wy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wy.getE2(), V.y, 1e-4f);
	auto wz = V.wz;
	BOOST_CHECK_CLOSE(wz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wz.getE2(), V.z, 1e-4f);
	auto ww = V.ww;
	BOOST_CHECK_CLOSE(ww.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ww.getE2(), V.w, 1e-4f);
	// 3d swizzles <x, y, z, w>
	auto xxx = V.xxx;
	BOOST_CHECK_CLOSE(xxx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxx.getE3(), V.x, 1e-4f);
	auto xxy = V.xxy;
	BOOST_CHECK_CLOSE(xxy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxy.getE3(), V.y, 1e-4f);
	auto xxz = V.xxz;
	BOOST_CHECK_CLOSE(xxz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxz.getE3(), V.z, 1e-4f);
	auto xxw = V.xxw;
	BOOST_CHECK_CLOSE(xxw.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxw.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxw.getE3(), V.w, 1e-4f);
	auto xyx = V.xyx;
	BOOST_CHECK_CLOSE(xyx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyx.getE3(), V.x, 1e-4f);
	auto xyy = V.xyy;
	BOOST_CHECK_CLOSE(xyy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyy.getE3(), V.y, 1e-4f);
	auto xyz = V.xyz;
	BOOST_CHECK_CLOSE(xyz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyz.getE3(), V.z, 1e-4f);
	auto xyw = V.xyw;
	BOOST_CHECK_CLOSE(xyw.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyw.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyw.getE3(), V.w, 1e-4f);
	auto xzx = V.xzx;
	BOOST_CHECK_CLOSE(xzx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzx.getE3(), V.x, 1e-4f);
	auto xzy = V.xzy;
	BOOST_CHECK_CLOSE(xzy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzy.getE3(), V.y, 1e-4f);
	auto xzz = V.xzz;
	BOOST_CHECK_CLOSE(xzz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzz.getE3(), V.z, 1e-4f);
	auto xzw = V.xzw;
	BOOST_CHECK_CLOSE(xzw.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzw.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzw.getE3(), V.w, 1e-4f);
	auto xwx = V.xwx;
	BOOST_CHECK_CLOSE(xwx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwx.getE3(), V.x, 1e-4f);
	auto xwy = V.xwy;
	BOOST_CHECK_CLOSE(xwy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwy.getE3(), V.y, 1e-4f);
	auto xwz = V.xwz;
	BOOST_CHECK_CLOSE(xwz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwz.getE3(), V.z, 1e-4f);
	auto xww = V.xww;
	BOOST_CHECK_CLOSE(xww.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xww.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xww.getE3(), V.w, 1e-4f);
	auto yxx = V.yxx;
	BOOST_CHECK_CLOSE(yxx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxx.getE3(), V.x, 1e-4f);
	auto yxy = V.yxy;
	BOOST_CHECK_CLOSE(yxy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxy.getE3(), V.y, 1e-4f);
	auto yxz = V.yxz;
	BOOST_CHECK_CLOSE(yxz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxz.getE3(), V.z, 1e-4f);
	auto yxw = V.yxw;
	BOOST_CHECK_CLOSE(yxw.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxw.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxw.getE3(), V.w, 1e-4f);
	auto yyx = V.yyx;
	BOOST_CHECK_CLOSE(yyx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyx.getE3(), V.x, 1e-4f);
	auto yyy = V.yyy;
	BOOST_CHECK_CLOSE(yyy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyy.getE3(), V.y, 1e-4f);
	auto yyz = V.yyz;
	BOOST_CHECK_CLOSE(yyz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyz.getE3(), V.z, 1e-4f);
	auto yyw = V.yyw;
	BOOST_CHECK_CLOSE(yyw.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyw.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyw.getE3(), V.w, 1e-4f);
	auto yzx = V.yzx;
	BOOST_CHECK_CLOSE(yzx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzx.getE3(), V.x, 1e-4f);
	auto yzy = V.yzy;
	BOOST_CHECK_CLOSE(yzy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzy.getE3(), V.y, 1e-4f);
	auto yzz = V.yzz;
	BOOST_CHECK_CLOSE(yzz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzz.getE3(), V.z, 1e-4f);
	auto yzw = V.yzw;
	BOOST_CHECK_CLOSE(yzw.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzw.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzw.getE3(), V.w, 1e-4f);
	auto ywx = V.ywx;
	BOOST_CHECK_CLOSE(ywx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywx.getE3(), V.x, 1e-4f);
	auto ywy = V.ywy;
	BOOST_CHECK_CLOSE(ywy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywy.getE3(), V.y, 1e-4f);
	auto ywz = V.ywz;
	BOOST_CHECK_CLOSE(ywz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywz.getE3(), V.z, 1e-4f);
	auto yww = V.yww;
	BOOST_CHECK_CLOSE(yww.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yww.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(yww.getE3(), V.w, 1e-4f);
	auto zxx = V.zxx;
	BOOST_CHECK_CLOSE(zxx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxx.getE3(), V.x, 1e-4f);
	auto zxy = V.zxy;
	BOOST_CHECK_CLOSE(zxy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxy.getE3(), V.y, 1e-4f);
	auto zxz = V.zxz;
	BOOST_CHECK_CLOSE(zxz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxz.getE3(), V.z, 1e-4f);
	auto zxw = V.zxw;
	BOOST_CHECK_CLOSE(zxw.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxw.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxw.getE3(), V.w, 1e-4f);
	auto zyx = V.zyx;
	BOOST_CHECK_CLOSE(zyx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyx.getE3(), V.x, 1e-4f);
	auto zyy = V.zyy;
	BOOST_CHECK_CLOSE(zyy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyy.getE3(), V.y, 1e-4f);
	auto zyz = V.zyz;
	BOOST_CHECK_CLOSE(zyz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyz.getE3(), V.z, 1e-4f);
	auto zyw = V.zyw;
	BOOST_CHECK_CLOSE(zyw.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyw.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyw.getE3(), V.w, 1e-4f);
	auto zzx = V.zzx;
	BOOST_CHECK_CLOSE(zzx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzx.getE3(), V.x, 1e-4f);
	auto zzy = V.zzy;
	BOOST_CHECK_CLOSE(zzy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzy.getE3(), V.y, 1e-4f);
	auto zzz = V.zzz;
	BOOST_CHECK_CLOSE(zzz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzz.getE3(), V.z, 1e-4f);
	auto zzw = V.zzw;
	BOOST_CHECK_CLOSE(zzw.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzw.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzw.getE3(), V.w, 1e-4f);
	auto zwx = V.zwx;
	BOOST_CHECK_CLOSE(zwx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwx.getE3(), V.x, 1e-4f);
	auto zwy = V.zwy;
	BOOST_CHECK_CLOSE(zwy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwy.getE3(), V.y, 1e-4f);
	auto zwz = V.zwz;
	BOOST_CHECK_CLOSE(zwz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwz.getE3(), V.z, 1e-4f);
	auto zww = V.zww;
	BOOST_CHECK_CLOSE(zww.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zww.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zww.getE3(), V.w, 1e-4f);
	auto wxx = V.wxx;
	BOOST_CHECK_CLOSE(wxx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxx.getE3(), V.x, 1e-4f);
	auto wxy = V.wxy;
	BOOST_CHECK_CLOSE(wxy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxy.getE3(), V.y, 1e-4f);
	auto wxz = V.wxz;
	BOOST_CHECK_CLOSE(wxz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxz.getE3(), V.z, 1e-4f);
	auto wxw = V.wxw;
	BOOST_CHECK_CLOSE(wxw.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxw.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxw.getE3(), V.w, 1e-4f);
	auto wyx = V.wyx;
	BOOST_CHECK_CLOSE(wyx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wyx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyx.getE3(), V.x, 1e-4f);
	auto wyy = V.wyy;
	BOOST_CHECK_CLOSE(wyy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wyy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyy.getE3(), V.y, 1e-4f);
	auto wyz = V.wyz;
	BOOST_CHECK_CLOSE(wyz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wyz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyz.getE3(), V.z, 1e-4f);
	auto wyw = V.wyw;
	BOOST_CHECK_CLOSE(wyw.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wyw.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyw.getE3(), V.w, 1e-4f);
	auto wzx = V.wzx;
	BOOST_CHECK_CLOSE(wzx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzx.getE3(), V.x, 1e-4f);
	auto wzy = V.wzy;
	BOOST_CHECK_CLOSE(wzy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzy.getE3(), V.y, 1e-4f);
	auto wzz = V.wzz;
	BOOST_CHECK_CLOSE(wzz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzz.getE3(), V.z, 1e-4f);
	auto wzw = V.wzw;
	BOOST_CHECK_CLOSE(wzw.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzw.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzw.getE3(), V.w, 1e-4f);
	auto wwx = V.wwx;
	BOOST_CHECK_CLOSE(wwx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwx.getE3(), V.x, 1e-4f);
	auto wwy = V.wwy;
	BOOST_CHECK_CLOSE(wwy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwy.getE3(), V.y, 1e-4f);
	auto wwz = V.wwz;
	BOOST_CHECK_CLOSE(wwz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwz.getE3(), V.z, 1e-4f);
	auto www = V.www;
	BOOST_CHECK_CLOSE(www.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(www.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(www.getE3(), V.w, 1e-4f);
	// 4d swizzles <x, y, z, w>
	auto xxxx = V.xxxx;
	BOOST_CHECK_CLOSE(xxxx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxxx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxxx.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxxx.getE4(), V.x, 1e-4f);
	auto xxxy = V.xxxy;
	BOOST_CHECK_CLOSE(xxxy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxxy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxxy.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxxy.getE4(), V.y, 1e-4f);
	auto xxxz = V.xxxz;
	BOOST_CHECK_CLOSE(xxxz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxxz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxxz.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxxz.getE4(), V.z, 1e-4f);
	auto xxxw = V.xxxw;
	BOOST_CHECK_CLOSE(xxxw.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxxw.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxxw.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxxw.getE4(), V.w, 1e-4f);
	auto xxyx = V.xxyx;
	BOOST_CHECK_CLOSE(xxyx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxyx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxyx.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xxyx.getE4(), V.x, 1e-4f);
	auto xxyy = V.xxyy;
	BOOST_CHECK_CLOSE(xxyy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxyy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxyy.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xxyy.getE4(), V.y, 1e-4f);
	auto xxyz = V.xxyz;
	BOOST_CHECK_CLOSE(xxyz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxyz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxyz.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xxyz.getE4(), V.z, 1e-4f);
	auto xxyw = V.xxyw;
	BOOST_CHECK_CLOSE(xxyw.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxyw.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxyw.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xxyw.getE4(), V.w, 1e-4f);
	auto xxzx = V.xxzx;
	BOOST_CHECK_CLOSE(xxzx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxzx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxzx.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xxzx.getE4(), V.x, 1e-4f);
	auto xxzy = V.xxzy;
	BOOST_CHECK_CLOSE(xxzy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxzy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxzy.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xxzy.getE4(), V.y, 1e-4f);
	auto xxzz = V.xxzz;
	BOOST_CHECK_CLOSE(xxzz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxzz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxzz.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xxzz.getE4(), V.z, 1e-4f);
	auto xxzw = V.xxzw;
	BOOST_CHECK_CLOSE(xxzw.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxzw.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxzw.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xxzw.getE4(), V.w, 1e-4f);
	auto xxwx = V.xxwx;
	BOOST_CHECK_CLOSE(xxwx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxwx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxwx.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xxwx.getE4(), V.x, 1e-4f);
	auto xxwy = V.xxwy;
	BOOST_CHECK_CLOSE(xxwy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxwy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxwy.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xxwy.getE4(), V.y, 1e-4f);
	auto xxwz = V.xxwz;
	BOOST_CHECK_CLOSE(xxwz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxwz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxwz.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xxwz.getE4(), V.z, 1e-4f);
	auto xxww = V.xxww;
	BOOST_CHECK_CLOSE(xxww.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxww.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xxww.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xxww.getE4(), V.w, 1e-4f);
	auto xyxx = V.xyxx;
	BOOST_CHECK_CLOSE(xyxx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyxx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyxx.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyxx.getE4(), V.x, 1e-4f);
	auto xyxy = V.xyxy;
	BOOST_CHECK_CLOSE(xyxy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyxy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyxy.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyxy.getE4(), V.y, 1e-4f);
	auto xyxz = V.xyxz;
	BOOST_CHECK_CLOSE(xyxz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyxz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyxz.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyxz.getE4(), V.z, 1e-4f);
	auto xyxw = V.xyxw;
	BOOST_CHECK_CLOSE(xyxw.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyxw.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyxw.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyxw.getE4(), V.w, 1e-4f);
	auto xyyx = V.xyyx;
	BOOST_CHECK_CLOSE(xyyx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyyx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyyx.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyyx.getE4(), V.x, 1e-4f);
	auto xyyy = V.xyyy;
	BOOST_CHECK_CLOSE(xyyy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyyy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyyy.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyyy.getE4(), V.y, 1e-4f);
	auto xyyz = V.xyyz;
	BOOST_CHECK_CLOSE(xyyz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyyz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyyz.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyyz.getE4(), V.z, 1e-4f);
	auto xyyw = V.xyyw;
	BOOST_CHECK_CLOSE(xyyw.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyyw.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyyw.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyyw.getE4(), V.w, 1e-4f);
	auto xyzx = V.xyzx;
	BOOST_CHECK_CLOSE(xyzx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyzx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyzx.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xyzx.getE4(), V.x, 1e-4f);
	auto xyzy = V.xyzy;
	BOOST_CHECK_CLOSE(xyzy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyzy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyzy.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xyzy.getE4(), V.y, 1e-4f);
	auto xyzz = V.xyzz;
	BOOST_CHECK_CLOSE(xyzz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyzz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyzz.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xyzz.getE4(), V.z, 1e-4f);
	auto xyzw = V.xyzw;
	BOOST_CHECK_CLOSE(xyzw.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyzw.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyzw.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xyzw.getE4(), V.w, 1e-4f);
	auto xywx = V.xywx;
	BOOST_CHECK_CLOSE(xywx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xywx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xywx.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xywx.getE4(), V.x, 1e-4f);
	auto xywy = V.xywy;
	BOOST_CHECK_CLOSE(xywy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xywy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xywy.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xywy.getE4(), V.y, 1e-4f);
	auto xywz = V.xywz;
	BOOST_CHECK_CLOSE(xywz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xywz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xywz.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xywz.getE4(), V.z, 1e-4f);
	auto xyww = V.xyww;
	BOOST_CHECK_CLOSE(xyww.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xyww.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xyww.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xyww.getE4(), V.w, 1e-4f);
	auto xzxx = V.xzxx;
	BOOST_CHECK_CLOSE(xzxx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzxx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzxx.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzxx.getE4(), V.x, 1e-4f);
	auto xzxy = V.xzxy;
	BOOST_CHECK_CLOSE(xzxy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzxy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzxy.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzxy.getE4(), V.y, 1e-4f);
	auto xzxz = V.xzxz;
	BOOST_CHECK_CLOSE(xzxz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzxz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzxz.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzxz.getE4(), V.z, 1e-4f);
	auto xzxw = V.xzxw;
	BOOST_CHECK_CLOSE(xzxw.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzxw.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzxw.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzxw.getE4(), V.w, 1e-4f);
	auto xzyx = V.xzyx;
	BOOST_CHECK_CLOSE(xzyx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzyx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzyx.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xzyx.getE4(), V.x, 1e-4f);
	auto xzyy = V.xzyy;
	BOOST_CHECK_CLOSE(xzyy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzyy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzyy.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xzyy.getE4(), V.y, 1e-4f);
	auto xzyz = V.xzyz;
	BOOST_CHECK_CLOSE(xzyz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzyz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzyz.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xzyz.getE4(), V.z, 1e-4f);
	auto xzyw = V.xzyw;
	BOOST_CHECK_CLOSE(xzyw.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzyw.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzyw.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xzyw.getE4(), V.w, 1e-4f);
	auto xzzx = V.xzzx;
	BOOST_CHECK_CLOSE(xzzx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzzx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzzx.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzzx.getE4(), V.x, 1e-4f);
	auto xzzy = V.xzzy;
	BOOST_CHECK_CLOSE(xzzy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzzy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzzy.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzzy.getE4(), V.y, 1e-4f);
	auto xzzz = V.xzzz;
	BOOST_CHECK_CLOSE(xzzz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzzz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzzz.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzzz.getE4(), V.z, 1e-4f);
	auto xzzw = V.xzzw;
	BOOST_CHECK_CLOSE(xzzw.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzzw.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzzw.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzzw.getE4(), V.w, 1e-4f);
	auto xzwx = V.xzwx;
	BOOST_CHECK_CLOSE(xzwx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzwx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzwx.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xzwx.getE4(), V.x, 1e-4f);
	auto xzwy = V.xzwy;
	BOOST_CHECK_CLOSE(xzwy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzwy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzwy.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xzwy.getE4(), V.y, 1e-4f);
	auto xzwz = V.xzwz;
	BOOST_CHECK_CLOSE(xzwz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzwz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzwz.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xzwz.getE4(), V.z, 1e-4f);
	auto xzww = V.xzww;
	BOOST_CHECK_CLOSE(xzww.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xzww.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xzww.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xzww.getE4(), V.w, 1e-4f);
	auto xwxx = V.xwxx;
	BOOST_CHECK_CLOSE(xwxx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwxx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwxx.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwxx.getE4(), V.x, 1e-4f);
	auto xwxy = V.xwxy;
	BOOST_CHECK_CLOSE(xwxy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwxy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwxy.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwxy.getE4(), V.y, 1e-4f);
	auto xwxz = V.xwxz;
	BOOST_CHECK_CLOSE(xwxz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwxz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwxz.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwxz.getE4(), V.z, 1e-4f);
	auto xwxw = V.xwxw;
	BOOST_CHECK_CLOSE(xwxw.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwxw.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwxw.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwxw.getE4(), V.w, 1e-4f);
	auto xwyx = V.xwyx;
	BOOST_CHECK_CLOSE(xwyx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwyx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwyx.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xwyx.getE4(), V.x, 1e-4f);
	auto xwyy = V.xwyy;
	BOOST_CHECK_CLOSE(xwyy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwyy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwyy.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xwyy.getE4(), V.y, 1e-4f);
	auto xwyz = V.xwyz;
	BOOST_CHECK_CLOSE(xwyz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwyz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwyz.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xwyz.getE4(), V.z, 1e-4f);
	auto xwyw = V.xwyw;
	BOOST_CHECK_CLOSE(xwyw.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwyw.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwyw.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(xwyw.getE4(), V.w, 1e-4f);
	auto xwzx = V.xwzx;
	BOOST_CHECK_CLOSE(xwzx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwzx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwzx.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xwzx.getE4(), V.x, 1e-4f);
	auto xwzy = V.xwzy;
	BOOST_CHECK_CLOSE(xwzy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwzy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwzy.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xwzy.getE4(), V.y, 1e-4f);
	auto xwzz = V.xwzz;
	BOOST_CHECK_CLOSE(xwzz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwzz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwzz.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xwzz.getE4(), V.z, 1e-4f);
	auto xwzw = V.xwzw;
	BOOST_CHECK_CLOSE(xwzw.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwzw.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwzw.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(xwzw.getE4(), V.w, 1e-4f);
	auto xwwx = V.xwwx;
	BOOST_CHECK_CLOSE(xwwx.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwwx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwwx.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwwx.getE4(), V.x, 1e-4f);
	auto xwwy = V.xwwy;
	BOOST_CHECK_CLOSE(xwwy.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwwy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwwy.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwwy.getE4(), V.y, 1e-4f);
	auto xwwz = V.xwwz;
	BOOST_CHECK_CLOSE(xwwz.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwwz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwwz.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwwz.getE4(), V.z, 1e-4f);
	auto xwww = V.xwww;
	BOOST_CHECK_CLOSE(xwww.getE1(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(xwww.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwww.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(xwww.getE4(), V.w, 1e-4f);
	auto yxxx = V.yxxx;
	BOOST_CHECK_CLOSE(yxxx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxxx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxxx.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxxx.getE4(), V.x, 1e-4f);
	auto yxxy = V.yxxy;
	BOOST_CHECK_CLOSE(yxxy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxxy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxxy.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxxy.getE4(), V.y, 1e-4f);
	auto yxxz = V.yxxz;
	BOOST_CHECK_CLOSE(yxxz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxxz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxxz.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxxz.getE4(), V.z, 1e-4f);
	auto yxxw = V.yxxw;
	BOOST_CHECK_CLOSE(yxxw.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxxw.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxxw.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxxw.getE4(), V.w, 1e-4f);
	auto yxyx = V.yxyx;
	BOOST_CHECK_CLOSE(yxyx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxyx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxyx.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxyx.getE4(), V.x, 1e-4f);
	auto yxyy = V.yxyy;
	BOOST_CHECK_CLOSE(yxyy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxyy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxyy.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxyy.getE4(), V.y, 1e-4f);
	auto yxyz = V.yxyz;
	BOOST_CHECK_CLOSE(yxyz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxyz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxyz.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxyz.getE4(), V.z, 1e-4f);
	auto yxyw = V.yxyw;
	BOOST_CHECK_CLOSE(yxyw.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxyw.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxyw.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxyw.getE4(), V.w, 1e-4f);
	auto yxzx = V.yxzx;
	BOOST_CHECK_CLOSE(yxzx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxzx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxzx.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yxzx.getE4(), V.x, 1e-4f);
	auto yxzy = V.yxzy;
	BOOST_CHECK_CLOSE(yxzy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxzy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxzy.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yxzy.getE4(), V.y, 1e-4f);
	auto yxzz = V.yxzz;
	BOOST_CHECK_CLOSE(yxzz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxzz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxzz.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yxzz.getE4(), V.z, 1e-4f);
	auto yxzw = V.yxzw;
	BOOST_CHECK_CLOSE(yxzw.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxzw.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxzw.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yxzw.getE4(), V.w, 1e-4f);
	auto yxwx = V.yxwx;
	BOOST_CHECK_CLOSE(yxwx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxwx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxwx.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(yxwx.getE4(), V.x, 1e-4f);
	auto yxwy = V.yxwy;
	BOOST_CHECK_CLOSE(yxwy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxwy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxwy.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(yxwy.getE4(), V.y, 1e-4f);
	auto yxwz = V.yxwz;
	BOOST_CHECK_CLOSE(yxwz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxwz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxwz.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(yxwz.getE4(), V.z, 1e-4f);
	auto yxww = V.yxww;
	BOOST_CHECK_CLOSE(yxww.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yxww.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yxww.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(yxww.getE4(), V.w, 1e-4f);
	auto yyxx = V.yyxx;
	BOOST_CHECK_CLOSE(yyxx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyxx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyxx.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yyxx.getE4(), V.x, 1e-4f);
	auto yyxy = V.yyxy;
	BOOST_CHECK_CLOSE(yyxy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyxy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyxy.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yyxy.getE4(), V.y, 1e-4f);
	auto yyxz = V.yyxz;
	BOOST_CHECK_CLOSE(yyxz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyxz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyxz.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yyxz.getE4(), V.z, 1e-4f);
	auto yyxw = V.yyxw;
	BOOST_CHECK_CLOSE(yyxw.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyxw.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyxw.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yyxw.getE4(), V.w, 1e-4f);
	auto yyyx = V.yyyx;
	BOOST_CHECK_CLOSE(yyyx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyyx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyyx.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyyx.getE4(), V.x, 1e-4f);
	auto yyyy = V.yyyy;
	BOOST_CHECK_CLOSE(yyyy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyyy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyyy.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyyy.getE4(), V.y, 1e-4f);
	auto yyyz = V.yyyz;
	BOOST_CHECK_CLOSE(yyyz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyyz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyyz.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyyz.getE4(), V.z, 1e-4f);
	auto yyyw = V.yyyw;
	BOOST_CHECK_CLOSE(yyyw.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyyw.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyyw.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyyw.getE4(), V.w, 1e-4f);
	auto yyzx = V.yyzx;
	BOOST_CHECK_CLOSE(yyzx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyzx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyzx.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yyzx.getE4(), V.x, 1e-4f);
	auto yyzy = V.yyzy;
	BOOST_CHECK_CLOSE(yyzy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyzy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyzy.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yyzy.getE4(), V.y, 1e-4f);
	auto yyzz = V.yyzz;
	BOOST_CHECK_CLOSE(yyzz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyzz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyzz.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yyzz.getE4(), V.z, 1e-4f);
	auto yyzw = V.yyzw;
	BOOST_CHECK_CLOSE(yyzw.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyzw.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyzw.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yyzw.getE4(), V.w, 1e-4f);
	auto yywx = V.yywx;
	BOOST_CHECK_CLOSE(yywx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yywx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yywx.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(yywx.getE4(), V.x, 1e-4f);
	auto yywy = V.yywy;
	BOOST_CHECK_CLOSE(yywy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yywy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yywy.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(yywy.getE4(), V.y, 1e-4f);
	auto yywz = V.yywz;
	BOOST_CHECK_CLOSE(yywz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yywz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yywz.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(yywz.getE4(), V.z, 1e-4f);
	auto yyww = V.yyww;
	BOOST_CHECK_CLOSE(yyww.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyww.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yyww.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(yyww.getE4(), V.w, 1e-4f);
	auto yzxx = V.yzxx;
	BOOST_CHECK_CLOSE(yzxx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzxx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzxx.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yzxx.getE4(), V.x, 1e-4f);
	auto yzxy = V.yzxy;
	BOOST_CHECK_CLOSE(yzxy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzxy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzxy.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yzxy.getE4(), V.y, 1e-4f);
	auto yzxz = V.yzxz;
	BOOST_CHECK_CLOSE(yzxz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzxz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzxz.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yzxz.getE4(), V.z, 1e-4f);
	auto yzxw = V.yzxw;
	BOOST_CHECK_CLOSE(yzxw.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzxw.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzxw.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(yzxw.getE4(), V.w, 1e-4f);
	auto yzyx = V.yzyx;
	BOOST_CHECK_CLOSE(yzyx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzyx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzyx.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzyx.getE4(), V.x, 1e-4f);
	auto yzyy = V.yzyy;
	BOOST_CHECK_CLOSE(yzyy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzyy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzyy.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzyy.getE4(), V.y, 1e-4f);
	auto yzyz = V.yzyz;
	BOOST_CHECK_CLOSE(yzyz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzyz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzyz.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzyz.getE4(), V.z, 1e-4f);
	auto yzyw = V.yzyw;
	BOOST_CHECK_CLOSE(yzyw.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzyw.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzyw.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzyw.getE4(), V.w, 1e-4f);
	auto yzzx = V.yzzx;
	BOOST_CHECK_CLOSE(yzzx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzzx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzzx.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzzx.getE4(), V.x, 1e-4f);
	auto yzzy = V.yzzy;
	BOOST_CHECK_CLOSE(yzzy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzzy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzzy.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzzy.getE4(), V.y, 1e-4f);
	auto yzzz = V.yzzz;
	BOOST_CHECK_CLOSE(yzzz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzzz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzzz.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzzz.getE4(), V.z, 1e-4f);
	auto yzzw = V.yzzw;
	BOOST_CHECK_CLOSE(yzzw.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzzw.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzzw.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzzw.getE4(), V.w, 1e-4f);
	auto yzwx = V.yzwx;
	BOOST_CHECK_CLOSE(yzwx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzwx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzwx.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(yzwx.getE4(), V.x, 1e-4f);
	auto yzwy = V.yzwy;
	BOOST_CHECK_CLOSE(yzwy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzwy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzwy.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(yzwy.getE4(), V.y, 1e-4f);
	auto yzwz = V.yzwz;
	BOOST_CHECK_CLOSE(yzwz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzwz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzwz.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(yzwz.getE4(), V.z, 1e-4f);
	auto yzww = V.yzww;
	BOOST_CHECK_CLOSE(yzww.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(yzww.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(yzww.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(yzww.getE4(), V.w, 1e-4f);
	auto ywxx = V.ywxx;
	BOOST_CHECK_CLOSE(ywxx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywxx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywxx.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(ywxx.getE4(), V.x, 1e-4f);
	auto ywxy = V.ywxy;
	BOOST_CHECK_CLOSE(ywxy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywxy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywxy.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(ywxy.getE4(), V.y, 1e-4f);
	auto ywxz = V.ywxz;
	BOOST_CHECK_CLOSE(ywxz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywxz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywxz.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(ywxz.getE4(), V.z, 1e-4f);
	auto ywxw = V.ywxw;
	BOOST_CHECK_CLOSE(ywxw.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywxw.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywxw.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(ywxw.getE4(), V.w, 1e-4f);
	auto ywyx = V.ywyx;
	BOOST_CHECK_CLOSE(ywyx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywyx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywyx.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywyx.getE4(), V.x, 1e-4f);
	auto ywyy = V.ywyy;
	BOOST_CHECK_CLOSE(ywyy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywyy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywyy.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywyy.getE4(), V.y, 1e-4f);
	auto ywyz = V.ywyz;
	BOOST_CHECK_CLOSE(ywyz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywyz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywyz.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywyz.getE4(), V.z, 1e-4f);
	auto ywyw = V.ywyw;
	BOOST_CHECK_CLOSE(ywyw.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywyw.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywyw.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywyw.getE4(), V.w, 1e-4f);
	auto ywzx = V.ywzx;
	BOOST_CHECK_CLOSE(ywzx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywzx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywzx.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(ywzx.getE4(), V.x, 1e-4f);
	auto ywzy = V.ywzy;
	BOOST_CHECK_CLOSE(ywzy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywzy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywzy.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(ywzy.getE4(), V.y, 1e-4f);
	auto ywzz = V.ywzz;
	BOOST_CHECK_CLOSE(ywzz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywzz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywzz.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(ywzz.getE4(), V.z, 1e-4f);
	auto ywzw = V.ywzw;
	BOOST_CHECK_CLOSE(ywzw.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywzw.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywzw.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(ywzw.getE4(), V.w, 1e-4f);
	auto ywwx = V.ywwx;
	BOOST_CHECK_CLOSE(ywwx.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywwx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywwx.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywwx.getE4(), V.x, 1e-4f);
	auto ywwy = V.ywwy;
	BOOST_CHECK_CLOSE(ywwy.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywwy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywwy.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywwy.getE4(), V.y, 1e-4f);
	auto ywwz = V.ywwz;
	BOOST_CHECK_CLOSE(ywwz.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywwz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywwz.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywwz.getE4(), V.z, 1e-4f);
	auto ywww = V.ywww;
	BOOST_CHECK_CLOSE(ywww.getE1(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(ywww.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywww.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(ywww.getE4(), V.w, 1e-4f);
	auto zxxx = V.zxxx;
	BOOST_CHECK_CLOSE(zxxx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxxx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxxx.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxxx.getE4(), V.x, 1e-4f);
	auto zxxy = V.zxxy;
	BOOST_CHECK_CLOSE(zxxy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxxy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxxy.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxxy.getE4(), V.y, 1e-4f);
	auto zxxz = V.zxxz;
	BOOST_CHECK_CLOSE(zxxz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxxz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxxz.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxxz.getE4(), V.z, 1e-4f);
	auto zxxw = V.zxxw;
	BOOST_CHECK_CLOSE(zxxw.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxxw.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxxw.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxxw.getE4(), V.w, 1e-4f);
	auto zxyx = V.zxyx;
	BOOST_CHECK_CLOSE(zxyx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxyx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxyx.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zxyx.getE4(), V.x, 1e-4f);
	auto zxyy = V.zxyy;
	BOOST_CHECK_CLOSE(zxyy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxyy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxyy.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zxyy.getE4(), V.y, 1e-4f);
	auto zxyz = V.zxyz;
	BOOST_CHECK_CLOSE(zxyz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxyz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxyz.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zxyz.getE4(), V.z, 1e-4f);
	auto zxyw = V.zxyw;
	BOOST_CHECK_CLOSE(zxyw.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxyw.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxyw.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zxyw.getE4(), V.w, 1e-4f);
	auto zxzx = V.zxzx;
	BOOST_CHECK_CLOSE(zxzx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxzx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxzx.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxzx.getE4(), V.x, 1e-4f);
	auto zxzy = V.zxzy;
	BOOST_CHECK_CLOSE(zxzy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxzy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxzy.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxzy.getE4(), V.y, 1e-4f);
	auto zxzz = V.zxzz;
	BOOST_CHECK_CLOSE(zxzz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxzz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxzz.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxzz.getE4(), V.z, 1e-4f);
	auto zxzw = V.zxzw;
	BOOST_CHECK_CLOSE(zxzw.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxzw.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxzw.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxzw.getE4(), V.w, 1e-4f);
	auto zxwx = V.zxwx;
	BOOST_CHECK_CLOSE(zxwx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxwx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxwx.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zxwx.getE4(), V.x, 1e-4f);
	auto zxwy = V.zxwy;
	BOOST_CHECK_CLOSE(zxwy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxwy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxwy.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zxwy.getE4(), V.y, 1e-4f);
	auto zxwz = V.zxwz;
	BOOST_CHECK_CLOSE(zxwz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxwz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxwz.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zxwz.getE4(), V.z, 1e-4f);
	auto zxww = V.zxww;
	BOOST_CHECK_CLOSE(zxww.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zxww.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zxww.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zxww.getE4(), V.w, 1e-4f);
	auto zyxx = V.zyxx;
	BOOST_CHECK_CLOSE(zyxx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyxx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyxx.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zyxx.getE4(), V.x, 1e-4f);
	auto zyxy = V.zyxy;
	BOOST_CHECK_CLOSE(zyxy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyxy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyxy.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zyxy.getE4(), V.y, 1e-4f);
	auto zyxz = V.zyxz;
	BOOST_CHECK_CLOSE(zyxz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyxz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyxz.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zyxz.getE4(), V.z, 1e-4f);
	auto zyxw = V.zyxw;
	BOOST_CHECK_CLOSE(zyxw.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyxw.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyxw.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zyxw.getE4(), V.w, 1e-4f);
	auto zyyx = V.zyyx;
	BOOST_CHECK_CLOSE(zyyx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyyx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyyx.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyyx.getE4(), V.x, 1e-4f);
	auto zyyy = V.zyyy;
	BOOST_CHECK_CLOSE(zyyy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyyy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyyy.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyyy.getE4(), V.y, 1e-4f);
	auto zyyz = V.zyyz;
	BOOST_CHECK_CLOSE(zyyz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyyz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyyz.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyyz.getE4(), V.z, 1e-4f);
	auto zyyw = V.zyyw;
	BOOST_CHECK_CLOSE(zyyw.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyyw.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyyw.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyyw.getE4(), V.w, 1e-4f);
	auto zyzx = V.zyzx;
	BOOST_CHECK_CLOSE(zyzx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyzx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyzx.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyzx.getE4(), V.x, 1e-4f);
	auto zyzy = V.zyzy;
	BOOST_CHECK_CLOSE(zyzy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyzy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyzy.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyzy.getE4(), V.y, 1e-4f);
	auto zyzz = V.zyzz;
	BOOST_CHECK_CLOSE(zyzz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyzz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyzz.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyzz.getE4(), V.z, 1e-4f);
	auto zyzw = V.zyzw;
	BOOST_CHECK_CLOSE(zyzw.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyzw.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyzw.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyzw.getE4(), V.w, 1e-4f);
	auto zywx = V.zywx;
	BOOST_CHECK_CLOSE(zywx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zywx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zywx.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zywx.getE4(), V.x, 1e-4f);
	auto zywy = V.zywy;
	BOOST_CHECK_CLOSE(zywy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zywy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zywy.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zywy.getE4(), V.y, 1e-4f);
	auto zywz = V.zywz;
	BOOST_CHECK_CLOSE(zywz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zywz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zywz.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zywz.getE4(), V.z, 1e-4f);
	auto zyww = V.zyww;
	BOOST_CHECK_CLOSE(zyww.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zyww.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zyww.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zyww.getE4(), V.w, 1e-4f);
	auto zzxx = V.zzxx;
	BOOST_CHECK_CLOSE(zzxx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzxx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzxx.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zzxx.getE4(), V.x, 1e-4f);
	auto zzxy = V.zzxy;
	BOOST_CHECK_CLOSE(zzxy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzxy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzxy.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zzxy.getE4(), V.y, 1e-4f);
	auto zzxz = V.zzxz;
	BOOST_CHECK_CLOSE(zzxz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzxz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzxz.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zzxz.getE4(), V.z, 1e-4f);
	auto zzxw = V.zzxw;
	BOOST_CHECK_CLOSE(zzxw.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzxw.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzxw.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zzxw.getE4(), V.w, 1e-4f);
	auto zzyx = V.zzyx;
	BOOST_CHECK_CLOSE(zzyx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzyx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzyx.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zzyx.getE4(), V.x, 1e-4f);
	auto zzyy = V.zzyy;
	BOOST_CHECK_CLOSE(zzyy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzyy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzyy.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zzyy.getE4(), V.y, 1e-4f);
	auto zzyz = V.zzyz;
	BOOST_CHECK_CLOSE(zzyz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzyz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzyz.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zzyz.getE4(), V.z, 1e-4f);
	auto zzyw = V.zzyw;
	BOOST_CHECK_CLOSE(zzyw.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzyw.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzyw.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zzyw.getE4(), V.w, 1e-4f);
	auto zzzx = V.zzzx;
	BOOST_CHECK_CLOSE(zzzx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzzx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzzx.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzzx.getE4(), V.x, 1e-4f);
	auto zzzy = V.zzzy;
	BOOST_CHECK_CLOSE(zzzy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzzy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzzy.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzzy.getE4(), V.y, 1e-4f);
	auto zzzz = V.zzzz;
	BOOST_CHECK_CLOSE(zzzz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzzz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzzz.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzzz.getE4(), V.z, 1e-4f);
	auto zzzw = V.zzzw;
	BOOST_CHECK_CLOSE(zzzw.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzzw.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzzw.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzzw.getE4(), V.w, 1e-4f);
	auto zzwx = V.zzwx;
	BOOST_CHECK_CLOSE(zzwx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzwx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzwx.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zzwx.getE4(), V.x, 1e-4f);
	auto zzwy = V.zzwy;
	BOOST_CHECK_CLOSE(zzwy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzwy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzwy.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zzwy.getE4(), V.y, 1e-4f);
	auto zzwz = V.zzwz;
	BOOST_CHECK_CLOSE(zzwz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzwz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzwz.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zzwz.getE4(), V.z, 1e-4f);
	auto zzww = V.zzww;
	BOOST_CHECK_CLOSE(zzww.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzww.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zzww.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zzww.getE4(), V.w, 1e-4f);
	auto zwxx = V.zwxx;
	BOOST_CHECK_CLOSE(zwxx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwxx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwxx.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zwxx.getE4(), V.x, 1e-4f);
	auto zwxy = V.zwxy;
	BOOST_CHECK_CLOSE(zwxy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwxy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwxy.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zwxy.getE4(), V.y, 1e-4f);
	auto zwxz = V.zwxz;
	BOOST_CHECK_CLOSE(zwxz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwxz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwxz.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zwxz.getE4(), V.z, 1e-4f);
	auto zwxw = V.zwxw;
	BOOST_CHECK_CLOSE(zwxw.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwxw.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwxw.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(zwxw.getE4(), V.w, 1e-4f);
	auto zwyx = V.zwyx;
	BOOST_CHECK_CLOSE(zwyx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwyx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwyx.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zwyx.getE4(), V.x, 1e-4f);
	auto zwyy = V.zwyy;
	BOOST_CHECK_CLOSE(zwyy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwyy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwyy.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zwyy.getE4(), V.y, 1e-4f);
	auto zwyz = V.zwyz;
	BOOST_CHECK_CLOSE(zwyz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwyz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwyz.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zwyz.getE4(), V.z, 1e-4f);
	auto zwyw = V.zwyw;
	BOOST_CHECK_CLOSE(zwyw.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwyw.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwyw.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(zwyw.getE4(), V.w, 1e-4f);
	auto zwzx = V.zwzx;
	BOOST_CHECK_CLOSE(zwzx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwzx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwzx.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwzx.getE4(), V.x, 1e-4f);
	auto zwzy = V.zwzy;
	BOOST_CHECK_CLOSE(zwzy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwzy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwzy.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwzy.getE4(), V.y, 1e-4f);
	auto zwzz = V.zwzz;
	BOOST_CHECK_CLOSE(zwzz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwzz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwzz.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwzz.getE4(), V.z, 1e-4f);
	auto zwzw = V.zwzw;
	BOOST_CHECK_CLOSE(zwzw.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwzw.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwzw.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwzw.getE4(), V.w, 1e-4f);
	auto zwwx = V.zwwx;
	BOOST_CHECK_CLOSE(zwwx.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwwx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwwx.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwwx.getE4(), V.x, 1e-4f);
	auto zwwy = V.zwwy;
	BOOST_CHECK_CLOSE(zwwy.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwwy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwwy.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwwy.getE4(), V.y, 1e-4f);
	auto zwwz = V.zwwz;
	BOOST_CHECK_CLOSE(zwwz.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwwz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwwz.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwwz.getE4(), V.z, 1e-4f);
	auto zwww = V.zwww;
	BOOST_CHECK_CLOSE(zwww.getE1(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(zwww.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwww.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(zwww.getE4(), V.w, 1e-4f);
	auto wxxx = V.wxxx;
	BOOST_CHECK_CLOSE(wxxx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxxx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxxx.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxxx.getE4(), V.x, 1e-4f);
	auto wxxy = V.wxxy;
	BOOST_CHECK_CLOSE(wxxy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxxy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxxy.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxxy.getE4(), V.y, 1e-4f);
	auto wxxz = V.wxxz;
	BOOST_CHECK_CLOSE(wxxz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxxz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxxz.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxxz.getE4(), V.z, 1e-4f);
	auto wxxw = V.wxxw;
	BOOST_CHECK_CLOSE(wxxw.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxxw.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxxw.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxxw.getE4(), V.w, 1e-4f);
	auto wxyx = V.wxyx;
	BOOST_CHECK_CLOSE(wxyx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxyx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxyx.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wxyx.getE4(), V.x, 1e-4f);
	auto wxyy = V.wxyy;
	BOOST_CHECK_CLOSE(wxyy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxyy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxyy.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wxyy.getE4(), V.y, 1e-4f);
	auto wxyz = V.wxyz;
	BOOST_CHECK_CLOSE(wxyz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxyz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxyz.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wxyz.getE4(), V.z, 1e-4f);
	auto wxyw = V.wxyw;
	BOOST_CHECK_CLOSE(wxyw.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxyw.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxyw.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wxyw.getE4(), V.w, 1e-4f);
	auto wxzx = V.wxzx;
	BOOST_CHECK_CLOSE(wxzx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxzx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxzx.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wxzx.getE4(), V.x, 1e-4f);
	auto wxzy = V.wxzy;
	BOOST_CHECK_CLOSE(wxzy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxzy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxzy.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wxzy.getE4(), V.y, 1e-4f);
	auto wxzz = V.wxzz;
	BOOST_CHECK_CLOSE(wxzz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxzz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxzz.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wxzz.getE4(), V.z, 1e-4f);
	auto wxzw = V.wxzw;
	BOOST_CHECK_CLOSE(wxzw.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxzw.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxzw.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wxzw.getE4(), V.w, 1e-4f);
	auto wxwx = V.wxwx;
	BOOST_CHECK_CLOSE(wxwx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxwx.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxwx.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxwx.getE4(), V.x, 1e-4f);
	auto wxwy = V.wxwy;
	BOOST_CHECK_CLOSE(wxwy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxwy.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxwy.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxwy.getE4(), V.y, 1e-4f);
	auto wxwz = V.wxwz;
	BOOST_CHECK_CLOSE(wxwz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxwz.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxwz.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxwz.getE4(), V.z, 1e-4f);
	auto wxww = V.wxww;
	BOOST_CHECK_CLOSE(wxww.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxww.getE2(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wxww.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wxww.getE4(), V.w, 1e-4f);
	auto wyxx = V.wyxx;
	BOOST_CHECK_CLOSE(wyxx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wyxx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyxx.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wyxx.getE4(), V.x, 1e-4f);
	auto wyxy = V.wyxy;
	BOOST_CHECK_CLOSE(wyxy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wyxy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyxy.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wyxy.getE4(), V.y, 1e-4f);
	auto wyxz = V.wyxz;
	BOOST_CHECK_CLOSE(wyxz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wyxz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyxz.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wyxz.getE4(), V.z, 1e-4f);
	auto wyxw = V.wyxw;
	BOOST_CHECK_CLOSE(wyxw.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wyxw.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyxw.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wyxw.getE4(), V.w, 1e-4f);
	auto wyyx = V.wyyx;
	BOOST_CHECK_CLOSE(wyyx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wyyx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyyx.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyyx.getE4(), V.x, 1e-4f);
	auto wyyy = V.wyyy;
	BOOST_CHECK_CLOSE(wyyy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wyyy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyyy.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyyy.getE4(), V.y, 1e-4f);
	auto wyyz = V.wyyz;
	BOOST_CHECK_CLOSE(wyyz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wyyz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyyz.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyyz.getE4(), V.z, 1e-4f);
	auto wyyw = V.wyyw;
	BOOST_CHECK_CLOSE(wyyw.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wyyw.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyyw.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyyw.getE4(), V.w, 1e-4f);
	auto wyzx = V.wyzx;
	BOOST_CHECK_CLOSE(wyzx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wyzx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyzx.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wyzx.getE4(), V.x, 1e-4f);
	auto wyzy = V.wyzy;
	BOOST_CHECK_CLOSE(wyzy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wyzy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyzy.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wyzy.getE4(), V.y, 1e-4f);
	auto wyzz = V.wyzz;
	BOOST_CHECK_CLOSE(wyzz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wyzz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyzz.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wyzz.getE4(), V.z, 1e-4f);
	auto wyzw = V.wyzw;
	BOOST_CHECK_CLOSE(wyzw.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wyzw.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyzw.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wyzw.getE4(), V.w, 1e-4f);
	auto wywx = V.wywx;
	BOOST_CHECK_CLOSE(wywx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wywx.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wywx.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wywx.getE4(), V.x, 1e-4f);
	auto wywy = V.wywy;
	BOOST_CHECK_CLOSE(wywy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wywy.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wywy.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wywy.getE4(), V.y, 1e-4f);
	auto wywz = V.wywz;
	BOOST_CHECK_CLOSE(wywz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wywz.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wywz.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wywz.getE4(), V.z, 1e-4f);
	auto wyww = V.wyww;
	BOOST_CHECK_CLOSE(wyww.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wyww.getE2(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wyww.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wyww.getE4(), V.w, 1e-4f);
	auto wzxx = V.wzxx;
	BOOST_CHECK_CLOSE(wzxx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzxx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzxx.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wzxx.getE4(), V.x, 1e-4f);
	auto wzxy = V.wzxy;
	BOOST_CHECK_CLOSE(wzxy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzxy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzxy.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wzxy.getE4(), V.y, 1e-4f);
	auto wzxz = V.wzxz;
	BOOST_CHECK_CLOSE(wzxz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzxz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzxz.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wzxz.getE4(), V.z, 1e-4f);
	auto wzxw = V.wzxw;
	BOOST_CHECK_CLOSE(wzxw.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzxw.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzxw.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wzxw.getE4(), V.w, 1e-4f);
	auto wzyx = V.wzyx;
	BOOST_CHECK_CLOSE(wzyx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzyx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzyx.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wzyx.getE4(), V.x, 1e-4f);
	auto wzyy = V.wzyy;
	BOOST_CHECK_CLOSE(wzyy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzyy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzyy.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wzyy.getE4(), V.y, 1e-4f);
	auto wzyz = V.wzyz;
	BOOST_CHECK_CLOSE(wzyz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzyz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzyz.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wzyz.getE4(), V.z, 1e-4f);
	auto wzyw = V.wzyw;
	BOOST_CHECK_CLOSE(wzyw.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzyw.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzyw.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wzyw.getE4(), V.w, 1e-4f);
	auto wzzx = V.wzzx;
	BOOST_CHECK_CLOSE(wzzx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzzx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzzx.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzzx.getE4(), V.x, 1e-4f);
	auto wzzy = V.wzzy;
	BOOST_CHECK_CLOSE(wzzy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzzy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzzy.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzzy.getE4(), V.y, 1e-4f);
	auto wzzz = V.wzzz;
	BOOST_CHECK_CLOSE(wzzz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzzz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzzz.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzzz.getE4(), V.z, 1e-4f);
	auto wzzw = V.wzzw;
	BOOST_CHECK_CLOSE(wzzw.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzzw.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzzw.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzzw.getE4(), V.w, 1e-4f);
	auto wzwx = V.wzwx;
	BOOST_CHECK_CLOSE(wzwx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzwx.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzwx.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzwx.getE4(), V.x, 1e-4f);
	auto wzwy = V.wzwy;
	BOOST_CHECK_CLOSE(wzwy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzwy.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzwy.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzwy.getE4(), V.y, 1e-4f);
	auto wzwz = V.wzwz;
	BOOST_CHECK_CLOSE(wzwz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzwz.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzwz.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzwz.getE4(), V.z, 1e-4f);
	auto wzww = V.wzww;
	BOOST_CHECK_CLOSE(wzww.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzww.getE2(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wzww.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wzww.getE4(), V.w, 1e-4f);
	auto wwxx = V.wwxx;
	BOOST_CHECK_CLOSE(wwxx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwxx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwxx.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wwxx.getE4(), V.x, 1e-4f);
	auto wwxy = V.wwxy;
	BOOST_CHECK_CLOSE(wwxy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwxy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwxy.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wwxy.getE4(), V.y, 1e-4f);
	auto wwxz = V.wwxz;
	BOOST_CHECK_CLOSE(wwxz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwxz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwxz.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wwxz.getE4(), V.z, 1e-4f);
	auto wwxw = V.wwxw;
	BOOST_CHECK_CLOSE(wwxw.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwxw.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwxw.getE3(), V.x, 1e-4f);
	BOOST_CHECK_CLOSE(wwxw.getE4(), V.w, 1e-4f);
	auto wwyx = V.wwyx;
	BOOST_CHECK_CLOSE(wwyx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwyx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwyx.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wwyx.getE4(), V.x, 1e-4f);
	auto wwyy = V.wwyy;
	BOOST_CHECK_CLOSE(wwyy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwyy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwyy.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wwyy.getE4(), V.y, 1e-4f);
	auto wwyz = V.wwyz;
	BOOST_CHECK_CLOSE(wwyz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwyz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwyz.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wwyz.getE4(), V.z, 1e-4f);
	auto wwyw = V.wwyw;
	BOOST_CHECK_CLOSE(wwyw.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwyw.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwyw.getE3(), V.y, 1e-4f);
	BOOST_CHECK_CLOSE(wwyw.getE4(), V.w, 1e-4f);
	auto wwzx = V.wwzx;
	BOOST_CHECK_CLOSE(wwzx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwzx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwzx.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wwzx.getE4(), V.x, 1e-4f);
	auto wwzy = V.wwzy;
	BOOST_CHECK_CLOSE(wwzy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwzy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwzy.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wwzy.getE4(), V.y, 1e-4f);
	auto wwzz = V.wwzz;
	BOOST_CHECK_CLOSE(wwzz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwzz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwzz.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wwzz.getE4(), V.z, 1e-4f);
	auto wwzw = V.wwzw;
	BOOST_CHECK_CLOSE(wwzw.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwzw.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwzw.getE3(), V.z, 1e-4f);
	BOOST_CHECK_CLOSE(wwzw.getE4(), V.w, 1e-4f);
	auto wwwx = V.wwwx;
	BOOST_CHECK_CLOSE(wwwx.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwwx.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwwx.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwwx.getE4(), V.x, 1e-4f);
	auto wwwy = V.wwwy;
	BOOST_CHECK_CLOSE(wwwy.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwwy.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwwy.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwwy.getE4(), V.y, 1e-4f);
	auto wwwz = V.wwwz;
	BOOST_CHECK_CLOSE(wwwz.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwwz.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwwz.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwwz.getE4(), V.z, 1e-4f);
	auto wwww = V.wwww;
	BOOST_CHECK_CLOSE(wwww.getE1(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwww.getE2(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwww.getE3(), V.w, 1e-4f);
	BOOST_CHECK_CLOSE(wwww.getE4(), V.w, 1e-4f);
}

BOOST_AUTO_TEST_CASE(assign_op) {
	vmath::core::Vector<float, 2> V2;
	V2.x = 20.12f;
	V2.y = 100.89f;
	vmath::core::Vector<float, 3> V3;
	V3.x = 20.12f;
	V3.y = 100.89f;
	V3.z = -18.2f;
	vmath::core::Vector<float, 4> V4;
	V4.x = 20.12f;
	V4.y = 100.89f;
	V4.z = -18.2f;
	V4.w = 35.62f;
	vmath::core::Vector<float, 4> V;
	V.x = 0.0f;
	V.y = 0.0f;
	V.z = 0.0f;
	V.w = 0.0f;
	// 2d swizzle assign <x, y, z, w> from vector
	V.xy = V2;
	BOOST_CHECK_CLOSE(V.x, V2.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.y, V2.y, 1e-4f);
	BOOST_CHECK_SMALL(V.z, 1e-7f);
	BOOST_CHECK_SMALL(V.w, 1e-7f);
	V.wz = V2;
	BOOST_CHECK_CLOSE(V.x, V2.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.y, V2.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.z, V2.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.w, V2.x, 1e-4f);
	V.yw = V2;
	BOOST_CHECK_CLOSE(V.x, V2.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.y, V2.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.z, V2.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.w, V2.y, 1e-4f);
	// 2d swizzle assign <x, y, z, w> from swizzle
	V.xy = V2.yy;
	BOOST_CHECK_CLOSE(V.x, V2.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.y, V2.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.z, V2.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.w, V2.y, 1e-4f);
	V.yz = V2.xy;
	BOOST_CHECK_CLOSE(V.x, V2.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.y, V2.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.z, V2.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.w, V2.y, 1e-4f);
	V.zw = V2.xx;
	BOOST_CHECK_CLOSE(V.x, V2.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.y, V2.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.z, V2.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.w, V2.x, 1e-4f);
	// 3d swizzle assign <x, y, z, w> from vector
	V.xyz = V3;
	BOOST_CHECK_CLOSE(V.x, V3.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.y, V3.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.z, V3.z, 1e-4f);
	BOOST_CHECK_CLOSE(V.w, V2.x, 1e-4f);
	V.zxw = V3;
	BOOST_CHECK_CLOSE(V.x, V3.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.y, V3.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.z, V3.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.w, V3.z, 1e-4f);
	V.wxy = V3;
	BOOST_CHECK_CLOSE(V.x, V3.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.y, V3.z, 1e-4f);
	BOOST_CHECK_CLOSE(V.z, V3.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.w, V3.x, 1e-4f);
	// 3d swizzle assign <x, y, z, w> from swizzle
	V.xyz = V3.xyz;
	BOOST_CHECK_CLOSE(V.x, V3.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.y, V3.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.z, V3.z, 1e-4f);
	BOOST_CHECK_CLOSE(V.w, V3.x, 1e-4f);
	V.zxw = V3.zzz;
	BOOST_CHECK_CLOSE(V.x, V3.z, 1e-4f);
	BOOST_CHECK_CLOSE(V.y, V3.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.z, V3.z, 1e-4f);
	BOOST_CHECK_CLOSE(V.w, V3.z, 1e-4f);
	V.wxy = V3.yyx;
	BOOST_CHECK_CLOSE(V.x, V3.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.y, V3.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.z, V3.z, 1e-4f);
	BOOST_CHECK_CLOSE(V.w, V3.y, 1e-4f);
	// 4d swizzle assign <x, y, z, w> from vector
	V.xzyw = V4;
	BOOST_CHECK_CLOSE(V.x, V4.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.y, V4.z, 1e-4f);
	BOOST_CHECK_CLOSE(V.z, V4.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.w, V4.w, 1e-4f);
	V.yxzw = V4;
	BOOST_CHECK_CLOSE(V.x, V4.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.y, V4.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.z, V4.z, 1e-4f);
	BOOST_CHECK_CLOSE(V.w, V4.w, 1e-4f);
	V.zwyx = V4;
	BOOST_CHECK_CLOSE(V.x, V4.w, 1e-4f);
	BOOST_CHECK_CLOSE(V.y, V4.z, 1e-4f);
	BOOST_CHECK_CLOSE(V.z, V4.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.w, V4.y, 1e-4f);
	// 4d swizzle assign <x, y, z, w> from swizzle
	V.xzyw = V4.xxxx;
	BOOST_CHECK_CLOSE(V.x, V4.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.y, V4.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.z, V4.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.w, V4.x, 1e-4f);
	V.yxzw = V4.wwyy;
	BOOST_CHECK_CLOSE(V.x, V4.w, 1e-4f);
	BOOST_CHECK_CLOSE(V.y, V4.w, 1e-4f);
	BOOST_CHECK_CLOSE(V.z, V4.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.w, V4.y, 1e-4f);
	V.zwyx = V4.wzyx;
	BOOST_CHECK_CLOSE(V.x, V4.x, 1e-4f);
	BOOST_CHECK_CLOSE(V.y, V4.y, 1e-4f);
	BOOST_CHECK_CLOSE(V.z, V4.w, 1e-4f);
	BOOST_CHECK_CLOSE(V.w, V4.z, 1e-4f);
}

BOOST_AUTO_TEST_CASE(equals) {
	vmath::core::Vector<float, 4> V1;
	V1.x = 20.12f;
	V1.y = 100.89f;
	V1.z = 18.2f;
	V1.w = 35.62f;
	vmath::core::Vector<float, 4> V2;
	V2.x = 10.34f;
	V2.y = 15.5f;
	V2.z = 20.2f;
	V2.w = 200.34f;
	vmath::core::Vector<float, 4> V3;
	V3.x = 20.12f;
	V3.y = 100.89f;
	V3.z = 18.2f;
	V3.w = 35.62f;
	BOOST_CHECK(!V1.xyzw.equals(V2));
	BOOST_CHECK(!V2.xyzw.equals(V3));
	BOOST_CHECK(V1.xyzw.equals(V1));
	BOOST_CHECK(V1.xyzw.equals(V3));
}

BOOST_AUTO_TEST_CASE(equals_specify_ulp) {
	vmath::core::Vector<float, 4> V1;
	V1.x = 20.12f;
	V1.y = 100.89f;
	V1.z = 18.2f;
	V1.w = 35.62f;
	vmath::core::Vector<float, 4> V2;
	V2.x = 10.34f;
	V2.y = 15.5f;
	V2.z = 20.2f;
	V2.w = 200.34f;
	vmath::core::Vector<float, 4> V3;
	V3.x = 20.12f;
	V3.y = 100.89f;
	V3.z = 18.2f;
	V3.w = 35.62f;
	BOOST_CHECK(!V1.xyzw.equals(V2, 3));
	BOOST_CHECK(!V2.xyzw.equals(V3, 3));
	BOOST_CHECK(V1.xyzw.equals(V1, 3));
	BOOST_CHECK(V1.xyzw.equals(V3, 3));
}

BOOST_AUTO_TEST_CASE(equals_op) {
	vmath::core::Vector<float, 4> V1;
	V1.x = 20.12f;
	V1.y = 100.89f;
	V1.z = 18.2f;
	V1.w = 35.62f;
	vmath::core::Vector<float, 4> V2;
	V2.x = 10.34f;
	V2.y = 15.5f;
	V2.z = 20.2f;
	V2.w = 200.34f;
	vmath::core::Vector<float, 4> V3;
	V3.x = 20.12f;
	V3.y = 100.89f;
	V3.z = 18.2f;
	V3.w = 35.62f;
	BOOST_CHECK(V1.xyzw != V2);
	BOOST_CHECK(V2.xyzw != V3);
	BOOST_CHECK(V1.xyzw == V1);
	BOOST_CHECK(V1.xyzw == V3);
}

BOOST_AUTO_TEST_SUITE_END()


// Boost.Geometry (aka GGL, Generic Geometry Library)
// Unit Test

// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.

// This file was modified by Oracle on 2014.
// Modifications copyright (c) 2014, Oracle and/or its affiliates.

// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle

// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.

// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_TEST_MODULE
#define BOOST_TEST_MODULE test_pythagoras_point_box
#endif

#include <boost/test/included/unit_test.hpp>

#if defined(_MSC_VER)
#  pragma warning( disable : 4101 )
#endif

#include <boost/core/ignore_unused.hpp>
#include <boost/timer.hpp>

#include <boost/concept/requires.hpp>
#include <boost/concept_check.hpp>

#include <boost/geometry/algorithms/assign.hpp>
#include <boost/geometry/algorithms/expand.hpp>
#include <boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp>
#include <boost/geometry/strategies/concepts/distance_concept.hpp>

#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/box.hpp>
#include <boost/geometry/geometries/adapted/c_array.hpp>
#include <boost/geometry/geometries/adapted/boost_tuple.hpp>

#include <test_common/test_point.hpp>

#ifdef HAVE_TTMATH
#  include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
#endif

namespace bg = boost::geometry;

BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)

template <typename Box, typename Coordinate>
inline void assign_values(Box& box,
                          Coordinate const& x1,
                          Coordinate const& y1,
                          Coordinate const& z1,
                          Coordinate const& x2,
                          Coordinate const& y2,
                          Coordinate const& z2)
{
    typename bg::point_type<Box>::type p1, p2;
    bg::assign_values(p1, x1, y1, z1);
    bg::assign_values(p2, x2, y2, z2);
    bg::assign(box, p1);
    bg::expand(box, p2);
}

template <typename Point, typename Box>
inline void test_null_distance_3d()
{
    Point p;
    bg::assign_values(p, 1, 2, 4);
    Box b;
    assign_values(b, 1, 2, 3, 4, 5, 6);

    typedef bg::strategy::distance::pythagoras_point_box<> pythagoras_pb_type;
    typedef typename bg::strategy::distance::services::return_type
        <
            pythagoras_pb_type, Point, Box
        >::type return_type;

    pythagoras_pb_type pythagoras_pb;
    return_type result = pythagoras_pb.apply(p, b);

    BOOST_CHECK_EQUAL(result, return_type(0));

    bg::assign_values(p, 1, 3, 4);
    result = pythagoras_pb.apply(p, b);
    BOOST_CHECK_EQUAL(result, return_type(0));

    bg::assign_values(p, 2, 3, 4);
    result = pythagoras_pb.apply(p, b);
    BOOST_CHECK_EQUAL(result, return_type(0));
}

template <typename Point, typename Box>
inline void test_axis_3d()
{
    Box b;
    assign_values(b, 0, 0, 0, 1, 1, 1);
    Point p;
    bg::assign_values(p, 2, 0, 0);

    typedef bg::strategy::distance::pythagoras_point_box<> pythagoras_pb_type;
    typedef typename bg::strategy::distance::services::return_type
        <
            pythagoras_pb_type, Point, Box
        >::type return_type;

    pythagoras_pb_type pythagoras_pb;

    return_type result = pythagoras_pb.apply(p, b);
    BOOST_CHECK_EQUAL(result, return_type(1));

    bg::assign_values(p, 0, 2, 0);
    result = pythagoras_pb.apply(p, b);
    BOOST_CHECK_EQUAL(result, return_type(1));

    bg::assign_values(p, 0, 0, 2);
    result = pythagoras_pb.apply(p, b);
    BOOST_CHECK_CLOSE(result, return_type(1), 0.001);
}

template <typename Point, typename Box>
inline void test_arbitrary_3d()
{
    Box b;
    assign_values(b, 0, 0, 0, 1, 2, 3);
    Point p;
    bg::assign_values(p, 9, 8, 7);

    {
        typedef bg::strategy::distance::pythagoras_point_box<> strategy_type;
        typedef typename bg::strategy::distance::services::return_type
            <
                strategy_type, Point, Box
            >::type return_type;

        strategy_type strategy;
        return_type result = strategy.apply(p, b);
        BOOST_CHECK_CLOSE(result, return_type(10.77032961427), 0.001);
    }

    {
        // Check comparable distance
        typedef bg::strategy::distance::comparable::pythagoras_point_box<>
            strategy_type;

        typedef typename bg::strategy::distance::services::return_type
            <
                strategy_type, Point, Box
            >::type return_type;

        strategy_type strategy;
        return_type result = strategy.apply(p, b);
        BOOST_CHECK_EQUAL(result, return_type(116));
    }
}

template <typename Point, typename Box, typename CalculationType>
inline void test_services()
{
    namespace bgsd = bg::strategy::distance;
    namespace services = bg::strategy::distance::services;

    {
        // Compile-check if there is a strategy for this type
        typedef typename services::default_strategy
            <
                bg::point_tag, bg::box_tag, Point, Box
            >::type pythagoras_pb_strategy_type;

        // reverse geometry tags
        typedef typename services::default_strategy
            <
                bg::box_tag, bg::point_tag, Box, Point
            >::type reversed_pythagoras_pb_strategy_type;

        boost::ignore_unused
            <
                pythagoras_pb_strategy_type,
                reversed_pythagoras_pb_strategy_type
            >();
    }

    Point p;
    bg::assign_values(p, 1, 2, 3);

    Box b;
    assign_values(b, 4, 5, 6, 14, 15, 16);

    double const sqr_expected = 3*3 + 3*3 + 3*3; // 27
    double const expected = sqrt(sqr_expected); // sqrt(27)=5.1961524227

    // 1: normal, calculate distance:

    typedef bgsd::pythagoras_point_box<CalculationType> strategy_type;

    BOOST_CONCEPT_ASSERT
        ( (bg::concepts::PointDistanceStrategy<strategy_type, Point, Box>) );

    typedef typename bgsd::services::return_type
        <
            strategy_type, Point, Box
        >::type return_type;

    strategy_type strategy;
    return_type result = strategy.apply(p, b);
    BOOST_CHECK_CLOSE(result, return_type(expected), 0.001);

    // 2: the strategy should return the same result if we reverse parameters
    //    result = strategy.apply(p2, p1);
    //    BOOST_CHECK_CLOSE(result, return_type(expected), 0.001);

    // 3: "comparable" to construct a "comparable strategy" for Point/Box
    //    a "comparable strategy" is a strategy which does not calculate the exact distance, but
    //    which returns results which can be mutually compared (e.g. avoid sqrt)

    // 3a: "comparable_type"
    typedef typename services::comparable_type
        <
            strategy_type
        >::type comparable_type;

    // 3b: "get_comparable"
    comparable_type comparable = bgsd::services::get_comparable
        <
            strategy_type
        >::apply(strategy);

    typedef typename bgsd::services::return_type
        <
            comparable_type, Point, Box
        >::type comparable_return_type;

    comparable_return_type c_result = comparable.apply(p, b);
    BOOST_CHECK_CLOSE(c_result, return_type(sqr_expected), 0.001);

    // 4: the comparable_type should have a distance_strategy_constructor as well,
    //    knowing how to compare something with a fixed distance
    comparable_return_type c_dist5 = services::result_from_distance
        <
            comparable_type, Point, Box
        >::apply(comparable, 5.0);

    comparable_return_type c_dist6 = services::result_from_distance
        <
            comparable_type, Point, Box
        >::apply(comparable, 6.0);

    // If this is the case:
    BOOST_CHECK(c_dist5 < c_result && c_result < c_dist6);

    // This should also be the case
    return_type dist5 = services::result_from_distance
        <
            strategy_type, Point, Box
        >::apply(strategy, 5.0);
    return_type dist6 = services::result_from_distance
        <
            strategy_type, Point, Box
        >::apply(strategy, 6.0);
    BOOST_CHECK(dist5 < result && result < dist6);
}

template
<
    typename CoordinateType,
    typename CalculationType,
    typename AssignType
>
inline void test_big_2d_with(AssignType const& x1, AssignType const& y1,
                             AssignType const& x2, AssignType const& y2,
                             AssignType const& zero)
{
    typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
    typedef bg::model::box<point_type> box_type;
    typedef bg::strategy::distance::pythagoras_point_box
        <
            CalculationType
        > pythagoras_pb_type;

    pythagoras_pb_type pythagoras_pb;
    typedef typename bg::strategy::distance::services::return_type
        <
            pythagoras_pb_type, point_type, box_type
        >::type return_type;

    point_type p;
    box_type b;
    bg::assign_values(b, zero, zero, x1, y1);
    bg::assign_values(p, x2, y2);
    return_type d = pythagoras_pb.apply(p, b);

    BOOST_CHECK_CLOSE(d, return_type(1076554.5485833955678294387789057), 0.001);
}

template <typename CoordinateType, typename CalculationType>
inline void test_big_2d()
{
    test_big_2d_with<CoordinateType, CalculationType>
        (123456.78900001, 234567.89100001,
         987654.32100001, 876543.21900001,
         0.0);
}

template <typename CoordinateType, typename CalculationType>
inline void test_big_2d_string()
{
    test_big_2d_with<CoordinateType, CalculationType>
        ("123456.78900001", "234567.89100001",
         "987654.32100001", "876543.21900001",
         "0.0000000000000");
}

template <typename CoordinateType>
inline void test_integer(bool check_types)
{
    typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
    typedef bg::model::box<point_type> box_type;

    point_type p;
    box_type b;
    bg::assign_values(b, 0, 0, 12345678, 23456789);
    bg::assign_values(p, 98765432, 87654321);

    typedef bg::strategy::distance::pythagoras_point_box<> pythagoras_type;
    typedef typename bg::strategy::distance::services::comparable_type
        <
            pythagoras_type
        >::type comparable_type;

    typedef typename bg::strategy::distance::services::return_type
        <
            pythagoras_type, point_type, box_type
        >::type distance_type;
    typedef typename bg::strategy::distance::services::return_type
        <
            comparable_type, point_type, box_type
        >::type cdistance_type;

    pythagoras_type pythagoras;
    distance_type distance = pythagoras.apply(p, b);
    BOOST_CHECK_CLOSE(distance, 107655455.02347542, 0.001);

    comparable_type comparable;
    cdistance_type cdistance = comparable.apply(p, b);
    BOOST_CHECK_EQUAL(cdistance, 11589696996311540.0);

    distance_type distance2 = sqrt(distance_type(cdistance));
    BOOST_CHECK_CLOSE(distance, distance2, 0.001);

    if (check_types)
    {
        BOOST_CHECK((boost::is_same<distance_type, double>::type::value));
        BOOST_CHECK((boost::is_same<cdistance_type, boost::long_long_type>::type::value));
    }
}

template <typename P1, typename P2>
void test_all_3d()
{
    test_null_distance_3d<P1, bg::model::box<P2> >();
    test_axis_3d<P1, bg::model::box<P2> >();
    test_arbitrary_3d<P1, bg::model::box<P2> >();

    test_null_distance_3d<P2, bg::model::box<P1> >();
    test_axis_3d<P2, bg::model::box<P1> >();
    test_arbitrary_3d<P2, bg::model::box<P1> >();
}

template <typename P>
void test_all_3d()
{
    test_all_3d<P, int[3]>();
    test_all_3d<P, float[3]>();
    test_all_3d<P, double[3]>();
    test_all_3d<P, test::test_point>();
    test_all_3d<P, bg::model::point<int, 3, bg::cs::cartesian> >();
    test_all_3d<P, bg::model::point<float, 3, bg::cs::cartesian> >();
    test_all_3d<P, bg::model::point<double, 3, bg::cs::cartesian> >();
}

template <typename P, typename Strategy>
void time_compare_s(int const n)
{
    typedef bg::model::box<P> box_type;

    boost::timer t;
    P p;
    box_type b;
    bg::assign_values(b, 0, 0, 1, 1);
    bg::assign_values(p, 2, 2);
    Strategy strategy;
    typename bg::strategy::distance::services::return_type
        <
            Strategy, P, box_type
        >::type s = 0;
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < n; j++)
        {
            bg::set<0>(p, bg::get<0>(p) + 0.001);
            s += strategy.apply(p, b);
        }
    }
    std::cout << "s: " << s << " t: " << t.elapsed() << std::endl;
}

template <typename P>
inline void time_compare(int const n)
{
    time_compare_s<P, bg::strategy::distance::pythagoras_point_box<> >(n);
    time_compare_s
        <
            P, bg::strategy::distance::comparable::pythagoras_point_box<>
        >(n);
}

BOOST_AUTO_TEST_CASE( test_integer_all )
{
    test_integer<int>(true);
    test_integer<boost::long_long_type>(true);
    test_integer<double>(false);
}

BOOST_AUTO_TEST_CASE( test_3d_all )
{
    test_all_3d<int[3]>();
    test_all_3d<float[3]>();
    test_all_3d<double[3]>();

    test_all_3d<test::test_point>();

    test_all_3d<bg::model::point<int, 3, bg::cs::cartesian> >();
    test_all_3d<bg::model::point<float, 3, bg::cs::cartesian> >();
    test_all_3d<bg::model::point<double, 3, bg::cs::cartesian> >();
}

BOOST_AUTO_TEST_CASE( test_big_2d_all )
{
    test_big_2d<float, float>();
    test_big_2d<double, double>();
    test_big_2d<long double, long double>();
    test_big_2d<float, long double>();
}

BOOST_AUTO_TEST_CASE( test_services_all )
{
    test_services
        <
            bg::model::point<float, 3, bg::cs::cartesian>,
            bg::model::box<double[3]>,
            long double
        >();
    test_services<double[3], bg::model::box<test::test_point>, float>();

    // reverse the point and box types
    test_services
        <
            double[3],
            bg::model::box<bg::model::point<float, 3, bg::cs::cartesian> >,
            long double
        >();
    test_services<test::test_point, bg::model::box<double[3]>, float>();
}

BOOST_AUTO_TEST_CASE( test_time_compare )
{
    // TODO move this to another non-unit test
    //    time_compare<bg::model::point<double, 2, bg::cs::cartesian> >(10000);
}

#if defined(HAVE_TTMATH)
BOOST_AUTO_TEST_CASE( test_ttmath_all )
{
    typedef ttmath::Big<1,4> tt;
    typedef bg::model::point<tt, 3, bg::cs::cartesian> tt_point;

    //test_all_3d<tt[3]>();
    test_all_3d<tt_point>();
    test_all_3d<tt_point, tt_point>();
    test_big_2d<tt, tt>();
    test_big_2d_string<tt, tt>();
}
#endif