Repository: Zuzu-Typ/PyGLM (language: python)

Issue:
Bitwise operators for i/uvec
GLSL and the C++ glm library both support bitwise operators (&, |, ^, <<, >>) on ivecs and uvecs. They may not have very common use cases but they can be used for implementing hash functions, for example (see e.g. https://www.shadertoy.com/view/XlXcW4).


Discussion / hints:

Fix patch:
diff --git a/PyGLM/type_methods/mvec.h b/PyGLM/type_methods/mvec.h
index 80e0722..0bf97d5 100644
--- a/PyGLM/type_methods/mvec.h
+++ b/PyGLM/type_methods/mvec.h
@@ -51,6 +51,13 @@ mvec_abs(mvec<L, T> *obj)
 	return pack_vec<L, T>(glm::abs(*obj->super_type));
 }
 
+template<int L, typename T>
+static PyObject*
+mvec_invert(mvec<L, T>* obj)
+{
+	return pack_vec<L, T>(~*obj->super_type);
+}
+
 // binaryfunc
 template<int L, typename T>
 static PyObject *
@@ -298,6 +305,171 @@ mvec_divmod(PyObject * obj1, PyObject * obj2) {
 	return out;
 }
 
+template<int L, typename T>
+static PyObject*
+mvec_lshift(PyObject* obj1, PyObject* obj2)
+{
+	if (PyGLM_Number_Check(obj1)) { // obj1 is a scalar, obj2 is self
+		return pack_vec<L, T>(PyGLM_Number_FromPyObject<T>(obj1) << *(((mvec<L, T>*)obj2)->super_type));
+	}
+
+	PyGLM_PTI_Init0(obj1, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(0)) { // obj1 is not supported.
+		PyGLM_TYPEERROR_O("unsupported operand type(s) for <<: 'glm.vec' and ", obj1);
+		return NULL;
+	}
+
+	glm::vec<L, T> o = PyGLM_Vec_PTI_Get0(L, T, obj1);
+
+	if (PyGLM_Number_Check(obj2)) { // obj1 is self, obj2 is a scalar
+		return pack_vec<L, T>(o << PyGLM_Number_FromPyObject<T>(obj2));
+	}
+
+	PyGLM_PTI_Init1(obj2, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(1)) { // obj1 is self, obj2 is something else
+		Py_RETURN_NOTIMPLEMENTED;
+	}
+
+	glm::vec<L, T> o2 = PyGLM_Vec_PTI_Get1(L, T, obj2);
+
+	// obj1 and obj2 can be interpreted as a mvec
+	return pack_vec<L, T>(o << o2);
+}
+
+template<int L, typename T>
+static PyObject*
+mvec_rshift(PyObject* obj1, PyObject* obj2)
+{
+	if (PyGLM_Number_Check(obj1)) { // obj1 is a scalar, obj2 is self
+		return pack_vec<L, T>(PyGLM_Number_FromPyObject<T>(obj1) >> *(((mvec<L, T>*)obj2)->super_type));
+	}
+
+	PyGLM_PTI_Init0(obj1, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(0)) { // obj1 is not supported.
+		PyGLM_TYPEERROR_O("unsupported operand type(s) for >>: 'glm.vec' and ", obj1);
+		return NULL;
+	}
+
+	glm::vec<L, T> o = PyGLM_Vec_PTI_Get0(L, T, obj1);
+
+	if (PyGLM_Number_Check(obj2)) { // obj1 is self, obj2 is a scalar
+		return pack_vec<L, T>(o >> PyGLM_Number_FromPyObject<T>(obj2));
+	}
+
+	PyGLM_PTI_Init1(obj2, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(1)) { // obj1 is self, obj2 is something else
+		Py_RETURN_NOTIMPLEMENTED;
+	}
+
+	glm::vec<L, T> o2 = PyGLM_Vec_PTI_Get1(L, T, obj2);
+
+	// obj1 and obj2 can be interpreted as a mvec
+	return pack_vec<L, T>(o >> o2);
+}
+
+template<int L, typename T>
+static PyObject*
+mvec_and(PyObject* obj1, PyObject* obj2)
+{
+	if (PyGLM_Number_Check(obj1)) { // obj1 is a scalar, obj2 is self
+		return pack_vec<L, T>(PyGLM_Number_FromPyObject<T>(obj1) & *(((mvec<L, T>*)obj2)->super_type));
+	}
+
+	PyGLM_PTI_Init0(obj1, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(0)) { // obj1 is not supported.
+		PyGLM_TYPEERROR_O("unsupported operand type(s) for &: 'glm.vec' and ", obj1);
+		return NULL;
+	}
+
+	glm::vec<L, T> o = PyGLM_Vec_PTI_Get0(L, T, obj1);
+
+	if (PyGLM_Number_Check(obj2)) { // obj1 is self, obj2 is a scalar
+		return pack_vec<L, T>(o & PyGLM_Number_FromPyObject<T>(obj2));
+	}
+
+	PyGLM_PTI_Init1(obj2, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(1)) { // obj1 is self, obj2 is something else
+		Py_RETURN_NOTIMPLEMENTED;
+	}
+
+	glm::vec<L, T> o2 = PyGLM_Vec_PTI_Get1(L, T, obj2);
+
+	// obj1 and obj2 can be interpreted as a mvec
+	return pack_vec<L, T>(o & o2);
+}
+
+template<int L, typename T>
+static PyObject*
+mvec_or(PyObject* obj1, PyObject* obj2)
+{
+	if (PyGLM_Number_Check(obj1)) { // obj1 is a scalar, obj2 is self
+		return pack_vec<L, T>(PyGLM_Number_FromPyObject<T>(obj1) | *(((mvec<L, T>*)obj2)->super_type));
+	}
+
+	PyGLM_PTI_Init0(obj1, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(0)) { // obj1 is not supported.
+		PyGLM_TYPEERROR_O("unsupported operand type(s) for |: 'glm.vec' and ", obj1);
+		return NULL;
+	}
+
+	glm::vec<L, T> o = PyGLM_Vec_PTI_Get0(L, T, obj1);
+
+	if (PyGLM_Number_Check(obj2)) { // obj1 is self, obj2 is a scalar
+		return pack_vec<L, T>(o | PyGLM_Number_FromPyObject<T>(obj2));
+	}
+
+	PyGLM_PTI_Init1(obj2, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(1)) { // obj1 is self, obj2 is something else
+		Py_RETURN_NOTIMPLEMENTED;
+	}
+
+	glm::vec<L, T> o2 = PyGLM_Vec_PTI_Get1(L, T, obj2);
+
+	// obj1 and obj2 can be interpreted as a mvec
+	return pack_vec<L, T>(o | o2);
+}
+
+template<int L, typename T>
+static PyObject*
+mvec_xor(PyObject* obj1, PyObject* obj2)
+{
+	if (PyGLM_Number_Check(obj1)) { // obj1 is a scalar, obj2 is self
+		return pack_vec<L, T>(PyGLM_Number_FromPyObject<T>(obj1) ^ *(((mvec<L, T>*)obj2)->super_type));
+	}
+
+	PyGLM_PTI_Init0(obj1, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(0)) { // obj1 is not supported.
+		PyGLM_TYPEERROR_O("unsupported operand type(s) for ^: 'glm.vec' and ", obj1);
+		return NULL;
+	}
+
+	glm::vec<L, T> o = PyGLM_Vec_PTI_Get0(L, T, obj1);
+
+	if (PyGLM_Number_Check(obj2)) { // obj1 is self, obj2 is a scalar
+		return pack_vec<L, T>(o ^ PyGLM_Number_FromPyObject<T>(obj2));
+	}
+
+	PyGLM_PTI_Init1(obj2, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(1)) { // obj1 is self, obj2 is something else
+		Py_RETURN_NOTIMPLEMENTED;
+	}
+
+	glm::vec<L, T> o2 = PyGLM_Vec_PTI_Get1(L, T, obj2);
+
+	// obj1 and obj2 can be interpreted as a mvec
+	return pack_vec<L, T>(o ^ o2);
+}
+
 // ternaryfunc
 template<int L, typename T>
 static PyObject *
@@ -511,6 +683,81 @@ mvec_imatmul(mvec<L, T>* self, PyObject* obj)
 	return (PyObject*)self;
 }
 
+template<int L, typename T>
+static PyObject*
+mvec_ilshift(mvec<L, T>* self, PyObject* obj)
+{
+	vec<L, T>* temp = (vec<L, T>*)mvec_lshift<L, T>((PyObject*)self, obj);
+
+	if (Py_IS_NOTIMPLEMENTED(temp)) return (PyObject*)temp;
+
+	*self->super_type = temp->super_type;
+
+	Py_DECREF(temp);
+	Py_INCREF(self);
+	return (PyObject*)self;
+}
+
+template<int L, typename T>
+static PyObject*
+mvec_irshift(mvec<L, T>* self, PyObject* obj)
+{
+	vec<L, T>* temp = (vec<L, T>*)mvec_rshift<L, T>((PyObject*)self, obj);
+
+	if (Py_IS_NOTIMPLEMENTED(temp)) return (PyObject*)temp;
+
+	*self->super_type = temp->super_type;
+
+	Py_DECREF(temp);
+	Py_INCREF(self);
+	return (PyObject*)self;
+}
+
+template<int L, typename T>
+static PyObject*
+mvec_iand(mvec<L, T>* self, PyObject* obj)
+{
+	vec<L, T>* temp = (vec<L, T>*)mvec_and<L, T>((PyObject*)self, obj);
+
+	if (Py_IS_NOTIMPLEMENTED(temp)) return (PyObject*)temp;
+
+	*self->super_type = temp->super_type;
+
+	Py_DECREF(temp);
+	Py_INCREF(self);
+	return (PyObject*)self;
+}
+
+template<int L, typename T>
+static PyObject*
+mvec_ixor(mvec<L, T>* self, PyObject* obj)
+{
+	vec<L, T>* temp = (vec<L, T>*)mvec_xor<L, T>((PyObject*)self, obj);
+
+	if (Py_IS_NOTIMPLEMENTED(temp)) return (PyObject*)temp;
+
+	*self->super_type = temp->super_type;
+
+	Py_DECREF(temp);
+	Py_INCREF(self);
+	return (PyObject*)self;
+}
+
+template<int L, typename T>
+static PyObject*
+mvec_ior(mvec<L, T>* self, PyObject* obj)
+{
+	vec<L, T>* temp = (vec<L, T>*)mvec_or<L, T>((PyObject*)self, obj);
+
+	if (Py_IS_NOTIMPLEMENTED(temp)) return (PyObject*)temp;
+
+	*self->super_type = temp->super_type;
+
+	Py_DECREF(temp);
+	Py_INCREF(self);
+	return (PyObject*)self;
+}
+
 // ternaryfunc
 template<int L, typename T>
 static PyObject *
diff --git a/PyGLM/type_methods/vec.h b/PyGLM/type_methods/vec.h
index 5492306..837c12b 100644
--- a/PyGLM/type_methods/vec.h
+++ b/PyGLM/type_methods/vec.h
@@ -502,6 +502,13 @@ vec_abs(vec<L, T> *obj)
 	return pack_vec<L, T>(glm::abs(obj->super_type));
 }
 
+template<int L, typename T>
+static PyObject*
+vec_invert(vec<L, T>* obj)
+{
+	return pack_vec<L, T>(~obj->super_type);
+}
+
 // binaryfunc
 template<int L, typename T>
 static PyObject *
@@ -839,6 +846,171 @@ vec_divmod(PyObject * obj1, PyObject * obj2) {
 	return out;
 }
 
+template<int L, typename T>
+static PyObject*
+vec_or(PyObject* obj1, PyObject* obj2)
+{
+	if (PyGLM_Number_Check(obj1)) { // obj1 is a scalar, obj2 is self
+		return pack_vec<L, T>(PyGLM_Number_FromPyObject<T>(obj1) | (((vec<L, T>*)obj2)->super_type));
+	}
+
+	PyGLM_PTI_Init0(obj1, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(0)) { // obj1 is not supported.
+		PyGLM_TYPEERROR_O("unsupported operand type(s) for |: 'glm.vec' and ", obj1);
+		return NULL;
+	}
+
+	glm::vec<L, T> o = PyGLM_Vec_PTI_Get0(L, T, obj1);
+
+	if (PyGLM_Number_Check(obj2)) { // obj1 is self, obj2 is a scalar
+		return pack_vec<L, T>(o | PyGLM_Number_FromPyObject<T>(obj2));
+	}
+
+	PyGLM_PTI_Init1(obj2, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(1)) { // obj1 is self, obj2 is something else
+		Py_RETURN_NOTIMPLEMENTED;
+	}
+
+	glm::vec<L, T> o2 = PyGLM_Vec_PTI_Get1(L, T, obj2);
+
+	// obj1 and obj2 can be interpreted as a vec
+	return pack_vec<L, T>(o | o2);
+}
+
+template<int L, typename T>
+static PyObject*
+vec_and(PyObject* obj1, PyObject* obj2)
+{
+	if (PyGLM_Number_Check(obj1)) { // obj1 is a scalar, obj2 is self
+		return pack_vec<L, T>(PyGLM_Number_FromPyObject<T>(obj1) & (((vec<L, T>*)obj2)->super_type));
+	}
+
+	PyGLM_PTI_Init0(obj1, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(0)) { // obj1 is not supported.
+		PyGLM_TYPEERROR_O("unsupported operand type(s) for &: 'glm.vec' and ", obj1);
+		return NULL;
+	}
+
+	glm::vec<L, T> o = PyGLM_Vec_PTI_Get0(L, T, obj1);
+
+	if (PyGLM_Number_Check(obj2)) { // obj1 is self, obj2 is a scalar
+		return pack_vec<L, T>(o & PyGLM_Number_FromPyObject<T>(obj2));
+	}
+
+	PyGLM_PTI_Init1(obj2, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(1)) { // obj1 is self, obj2 is something else
+		Py_RETURN_NOTIMPLEMENTED;
+	}
+
+	glm::vec<L, T> o2 = PyGLM_Vec_PTI_Get1(L, T, obj2);
+
+	// obj1 and obj2 can be interpreted as a vec
+	return pack_vec<L, T>(o & o2);
+}
+
+template<int L, typename T>
+static PyObject*
+vec_xor(PyObject* obj1, PyObject* obj2)
+{
+	if (PyGLM_Number_Check(obj1)) { // obj1 is a scalar, obj2 is self
+		return pack_vec<L, T>(PyGLM_Number_FromPyObject<T>(obj1) ^ (((vec<L, T>*)obj2)->super_type));
+	}
+
+	PyGLM_PTI_Init0(obj1, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(0)) { // obj1 is not supported.
+		PyGLM_TYPEERROR_O("unsupported operand type(s) for ^: 'glm.vec' and ", obj1);
+		return NULL;
+	}
+
+	glm::vec<L, T> o = PyGLM_Vec_PTI_Get0(L, T, obj1);
+
+	if (PyGLM_Number_Check(obj2)) { // obj1 is self, obj2 is a scalar
+		return pack_vec<L, T>(o ^ PyGLM_Number_FromPyObject<T>(obj2));
+	}
+
+	PyGLM_PTI_Init1(obj2, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(1)) { // obj1 is self, obj2 is something else
+		Py_RETURN_NOTIMPLEMENTED;
+	}
+
+	glm::vec<L, T> o2 = PyGLM_Vec_PTI_Get1(L, T, obj2);
+
+	// obj1 and obj2 can be interpreted as a vec
+	return pack_vec<L, T>(o ^ o2);
+}
+
+template<int L, typename T>
+static PyObject*
+vec_lshift(PyObject* obj1, PyObject* obj2)
+{
+	if (PyGLM_Number_Check(obj1)) { // obj1 is a scalar, obj2 is self
+		return pack_vec<L, T>(PyGLM_Number_FromPyObject<T>(obj1) << (((vec<L, T>*)obj2)->super_type));
+	}
+
+	PyGLM_PTI_Init0(obj1, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(0)) { // obj1 is not supported.
+		PyGLM_TYPEERROR_O("unsupported operand type(s) for <<: 'glm.vec' and ", obj1);
+		return NULL;
+	}
+
+	glm::vec<L, T> o = PyGLM_Vec_PTI_Get0(L, T, obj1);
+
+	if (PyGLM_Number_Check(obj2)) { // obj1 is self, obj2 is a scalar
+		return pack_vec<L, T>(o << PyGLM_Number_FromPyObject<T>(obj2));
+	}
+
+	PyGLM_PTI_Init1(obj2, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(1)) { // obj1 is self, obj2 is something else
+		Py_RETURN_NOTIMPLEMENTED;
+	}
+
+	glm::vec<L, T> o2 = PyGLM_Vec_PTI_Get1(L, T, obj2);
+
+	// obj1 and obj2 can be interpreted as a vec
+	return pack_vec<L, T>(o << o2);
+}
+
+template<int L, typename T>
+static PyObject*
+vec_rshift(PyObject* obj1, PyObject* obj2)
+{
+	if (PyGLM_Number_Check(obj1)) { // obj1 is a scalar, obj2 is self
+		return pack_vec<L, T>(PyGLM_Number_FromPyObject<T>(obj1) >> (((vec<L, T>*)obj2)->super_type));
+	}
+
+	PyGLM_PTI_Init0(obj1, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(0)) { // obj1 is not supported.
+		PyGLM_TYPEERROR_O("unsupported operand type(s) for >>: 'glm.vec' and ", obj1);
+		return NULL;
+	}
+
+	glm::vec<L, T> o = PyGLM_Vec_PTI_Get0(L, T, obj1);
+
+	if (PyGLM_Number_Check(obj2)) { // obj1 is self, obj2 is a scalar
+		return pack_vec<L, T>(o >> PyGLM_Number_FromPyObject<T>(obj2));
+	}
+
+	PyGLM_PTI_Init1(obj2, (get_vec_PTI_info<L, T>()));
+
+	if (PyGLM_PTI_IsNone(1)) { // obj1 is self, obj2 is something else
+		Py_RETURN_NOTIMPLEMENTED;
+	}
+
+	glm::vec<L, T> o2 = PyGLM_Vec_PTI_Get1(L, T, obj2);
+
+	// obj1 and obj2 can be interpreted as a vec
+	return pack_vec<L, T>(o >> o2);
+}
+
 // ternaryfunc
 template<int L, typename T>
 static PyObject *
@@ -1082,6 +1254,81 @@ vec_imatmul(vec<L, T>* self, PyObject* obj)
 	return (PyObject*)self;
 }
 
+template<int L, typename T>
+static PyObject*
+vec_ilshift(vec<L, T>* self, PyObject* obj)
+{
+	vec<L, T>* temp = (vec<L, T>*)vec_lshift<L, T>((PyObject*)self, obj);
+
+	if (Py_IS_NOTIMPLEMENTED(temp)) return (PyObject*)temp;
+
+	self->super_type = temp->super_type;
+
+	Py_DECREF(temp);
+	Py_INCREF(self);
+	return (PyObject*)self;
+}
+
+template<int L, typename T>
+static PyObject*
+vec_irshift(vec<L, T>* self, PyObject* obj)
+{
+	vec<L, T>* temp = (vec<L, T>*)vec_rshift<L, T>((PyObject*)self, obj);
+
+	if (Py_IS_NOTIMPLEMENTED(temp)) return (PyObject*)temp;
+
+	self->super_type = temp->super_type;
+
+	Py_DECREF(temp);
+	Py_INCREF(self);
+	return (PyObject*)self;
+}
+
+template<int L, typename T>
+static PyObject*
+vec_iand(vec<L, T>* self, PyObject* obj)
+{
+	vec<L, T>* temp = (vec<L, T>*)vec_and<L, T>((PyObject*)self, obj);
+
+	if (Py_IS_NOTIMPLEMENTED(temp)) return (PyObject*)temp;
+
+	self->super_type = temp->super_type;
+
+	Py_DECREF(temp);
+	Py_INCREF(self);
+	return (PyObject*)self;
+}
+
+template<int L, typename T>
+static PyObject*
+vec_ixor(vec<L, T>* self, PyObject* obj)
+{
+	vec<L, T>* temp = (vec<L, T>*)vec_xor<L, T>((PyObject*)self, obj);
+
+	if (Py_IS_NOTIMPLEMENTED(temp)) return (PyObject*)temp;
+
+	self->super_type = temp->super_type;
+
+	Py_DECREF(temp);
+	Py_INCREF(self);
+	return (PyObject*)self;
+}
+
+template<int L, typename T>
+static PyObject*
+vec_ior(vec<L, T>* self, PyObject* obj)
+{
+	vec<L, T>* temp = (vec<L, T>*)vec_or<L, T>((PyObject*)self, obj);
+
+	if (Py_IS_NOTIMPLEMENTED(temp)) return (PyObject*)temp;
+
+	self->super_type = temp->super_type;
+
+	Py_DECREF(temp);
+	Py_INCREF(self);
+	return (PyObject*)self;
+}
+
 // ternaryfunc
 template<int L, typename T>
 static PyObject *
diff --git a/PyGLM/types/mvec/forward_declarations.h b/PyGLM/types/mvec/forward_declarations.h
index 5f594c7..3c847f8 100644
--- a/PyGLM/types/mvec/forward_declarations.h
+++ b/PyGLM/types/mvec/forward_declarations.h
@@ -66,6 +66,21 @@ static PyObject * mvec_mod(PyObject *obj1, PyObject *obj2);
 template<int L, typename T>
 static PyObject * mvec_divmod(PyObject *obj1, PyObject *obj2);
 
+template<int L, typename T>
+static PyObject* mvec_lshift(PyObject* obj1, PyObject* obj2);
+
+template<int L, typename T>
+static PyObject* mvec_rshift(PyObject* obj1, PyObject* obj2);
+
+template<int L, typename T>
+static PyObject* mvec_and(PyObject* obj1, PyObject* obj2);
+
+template<int L, typename T>
+static PyObject* mvec_xor(PyObject* obj1, PyObject* obj2);
+
+template<int L, typename T>
+static PyObject* mvec_or(PyObject* obj1, PyObject* obj2);
+
 template<int L, typename T>
 static PyObject * mvec_pow(PyObject * obj1, PyObject * obj2, PyObject * obj3);
 
@@ -78,6 +93,9 @@ static PyObject * mvec_pos(mvec<L, T> *obj);
 template<int L, typename T>
 static PyObject * mvec_abs(mvec<L, T> *obj);
 
+template<int L, typename T>
+static PyObject* mvec_invert(mvec<L, T>* obj);
+
 static PyObject* mvec_matmul(PyObject* obj1, PyObject* obj2);
 
 template<int L, typename T>
@@ -110,6 +128,21 @@ static PyObject * mvec_idiv(mvec<L, T>* self, PyObject *obj);
 template<int L, typename T>
 static PyObject* mvec_imatmul(mvec<L, T>* self, PyObject* obj);
 
+template<int L, typename T>
+static PyObject* mvec_ilshift(mvec<L, T>* self, PyObject* obj);
+
+template<int L, typename T>
+static PyObject* mvec_irshift(mvec<L, T>* self, PyObject* obj);
+
+template<int L, typename T>
+static PyObject* mvec_iand(mvec<L, T>* self, PyObject* obj);
+
+template<int L, typename T>
+static PyObject* mvec_ixor(mvec<L, T>* self, PyObject* obj);
+
+template<int L, typename T>
+static PyObject* mvec_ior(mvec<L, T>* self, PyObject* obj);
+
 static void mvec_dealloc(PyObject* self);
 
 template<int L, typename T>
diff --git a/PyGLM/types/mvec/int/mvec2.h b/PyGLM/types/mvec/int/mvec2.h
index 3db4feb..7bf877a 100644
--- a/PyGLM/types/mvec/int/mvec2.h
+++ b/PyGLM/types/mvec/int/mvec2.h
@@ -41,12 +41,12 @@ static PyNumberMethods himvec2NumMethods = {
 	(unaryfunc)mvec_pos<2, glm::i32>, //nb_positive
 	(unaryfunc)mvec_abs<2, glm::i32>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)mvec_invert<2, glm::i32>, //nb_invert
+	(binaryfunc)mvec_lshift<2, glm::i32>, //nb_lshift
+	(binaryfunc)mvec_rshift<2, glm::i32>, //nb_rshift
+	(binaryfunc)mvec_and<2, glm::i32>, //nb_and
+	(binaryfunc)mvec_xor<2, glm::i32>, //nb_xor
+	(binaryfunc)mvec_or<2, glm::i32>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -55,11 +55,11 @@ static PyNumberMethods himvec2NumMethods = {
 	(binaryfunc)mvec_imul<2, glm::i32>, //nb_inplace_multiply
 	0, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)mvec_ilshift<2, glm::i32>, //nb_inplace_lshift
+	(binaryfunc)mvec_irshift<2, glm::i32>, //nb_inplace_rshift
+	(binaryfunc)mvec_iand<2, glm::i32>, //nb_inplace_and
+	(binaryfunc)mvec_ixor<2, glm::i32>, //nb_inplace_xor
+	(binaryfunc)mvec_ior<2, glm::i32>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)mvec_div<2, glm::i32>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/mvec/int/mvec3.h b/PyGLM/types/mvec/int/mvec3.h
index ff6f64b..60ab40d 100644
--- a/PyGLM/types/mvec/int/mvec3.h
+++ b/PyGLM/types/mvec/int/mvec3.h
@@ -41,12 +41,12 @@ static PyNumberMethods himvec3NumMethods = {
 	(unaryfunc)mvec_pos<3, glm::i32>, //nb_positive
 	(unaryfunc)mvec_abs<3, glm::i32>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)mvec_invert<3, glm::i32>, //nb_invert
+	(binaryfunc)mvec_lshift<3, glm::i32>, //nb_lshift
+	(binaryfunc)mvec_rshift<3, glm::i32>, //nb_rshift
+	(binaryfunc)mvec_and<3, glm::i32>, //nb_and
+	(binaryfunc)mvec_xor<3, glm::i32>, //nb_xor
+	(binaryfunc)mvec_or<3, glm::i32>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -55,11 +55,11 @@ static PyNumberMethods himvec3NumMethods = {
 	(binaryfunc)mvec_imul<3, glm::i32>, //nb_inplace_multiply
 	0, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)mvec_ilshift<3, glm::i32>, //nb_inplace_lshift
+	(binaryfunc)mvec_irshift<3, glm::i32>, //nb_inplace_rshift
+	(binaryfunc)mvec_iand<3, glm::i32>, //nb_inplace_and
+	(binaryfunc)mvec_ixor<3, glm::i32>, //nb_inplace_xor
+	(binaryfunc)mvec_ior<3, glm::i32>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)mvec_div<3, glm::i32>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/mvec/int/mvec4.h b/PyGLM/types/mvec/int/mvec4.h
index 3e2b138..28e5be9 100644
--- a/PyGLM/types/mvec/int/mvec4.h
+++ b/PyGLM/types/mvec/int/mvec4.h
@@ -41,12 +41,12 @@ static PyNumberMethods himvec4NumMethods = {
 	(unaryfunc)mvec_pos<4, glm::i32>, //nb_positive
 	(unaryfunc)mvec_abs<4, glm::i32>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)mvec_invert<4, glm::i32>, //nb_invert
+	(binaryfunc)mvec_lshift<4, glm::i32>, //nb_lshift
+	(binaryfunc)mvec_rshift<4, glm::i32>, //nb_rshift
+	(binaryfunc)mvec_and<4, glm::i32>, //nb_and
+	(binaryfunc)mvec_xor<4, glm::i32>, //nb_xor
+	(binaryfunc)mvec_or<4, glm::i32>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -55,11 +55,11 @@ static PyNumberMethods himvec4NumMethods = {
 	(binaryfunc)mvec_imul<4, glm::i32>, //nb_inplace_multiply
 	0, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)mvec_ilshift<4, glm::i32>, //nb_inplace_lshift
+	(binaryfunc)mvec_irshift<4, glm::i32>, //nb_inplace_rshift
+	(binaryfunc)mvec_iand<4, glm::i32>, //nb_inplace_and
+	(binaryfunc)mvec_ixor<4, glm::i32>, //nb_inplace_xor
+	(binaryfunc)mvec_ior<4, glm::i32>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)mvec_div<4, glm::i32>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/mvec/uint/mvec2.h b/PyGLM/types/mvec/uint/mvec2.h
index 32cd3f6..51c348f 100644
--- a/PyGLM/types/mvec/uint/mvec2.h
+++ b/PyGLM/types/mvec/uint/mvec2.h
@@ -41,12 +41,12 @@ static PyNumberMethods humvec2NumMethods = {
 	(unaryfunc)mvec_pos<2, glm::u32>, //nb_positive
 	(unaryfunc)mvec_abs<2, glm::u32>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)mvec_invert<2, glm::u32>, //nb_invert
+	(binaryfunc)mvec_lshift<2, glm::u32>, //nb_lshift
+	(binaryfunc)mvec_rshift<2, glm::u32>, //nb_rshift
+	(binaryfunc)mvec_and<2, glm::u32>, //nb_and
+	(binaryfunc)mvec_xor<2, glm::u32>, //nb_xor
+	(binaryfunc)mvec_or<2, glm::u32>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -55,11 +55,11 @@ static PyNumberMethods humvec2NumMethods = {
 	(binaryfunc)mvec_imul<2, glm::u32>, //nb_inplace_multiply
 	0, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)mvec_ilshift<2, glm::u32>, //nb_inplace_lshift
+	(binaryfunc)mvec_irshift<2, glm::u32>, //nb_inplace_rshift
+	(binaryfunc)mvec_iand<2, glm::u32>, //nb_inplace_and
+	(binaryfunc)mvec_ixor<2, glm::u32>, //nb_inplace_xor
+	(binaryfunc)mvec_ior<2, glm::u32>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)mvec_div<2, glm::u32>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/mvec/uint/mvec3.h b/PyGLM/types/mvec/uint/mvec3.h
index 93b0082..7febd5b 100644
--- a/PyGLM/types/mvec/uint/mvec3.h
+++ b/PyGLM/types/mvec/uint/mvec3.h
@@ -41,12 +41,12 @@ static PyNumberMethods humvec3NumMethods = {
 	(unaryfunc)mvec_pos<3, glm::u32>, //nb_positive
 	(unaryfunc)mvec_abs<3, glm::u32>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)mvec_invert<3, glm::u32>, //nb_invert
+	(binaryfunc)mvec_lshift<3, glm::u32>, //nb_lshift
+	(binaryfunc)mvec_rshift<3, glm::u32>, //nb_rshift
+	(binaryfunc)mvec_and<3, glm::u32>, //nb_and
+	(binaryfunc)mvec_xor<3, glm::u32>, //nb_xor
+	(binaryfunc)mvec_or<3, glm::u32>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -55,11 +55,11 @@ static PyNumberMethods humvec3NumMethods = {
 	(binaryfunc)mvec_imul<3, glm::u32>, //nb_inplace_multiply
 	0, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)mvec_ilshift<3, glm::u32>, //nb_inplace_lshift
+	(binaryfunc)mvec_irshift<3, glm::u32>, //nb_inplace_rshift
+	(binaryfunc)mvec_iand<3, glm::u32>, //nb_inplace_and
+	(binaryfunc)mvec_ixor<3, glm::u32>, //nb_inplace_xor
+	(binaryfunc)mvec_ior<3, glm::u32>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)mvec_div<3, glm::u32>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/mvec/uint/mvec4.h b/PyGLM/types/mvec/uint/mvec4.h
index e1b8215..e051df4 100644
--- a/PyGLM/types/mvec/uint/mvec4.h
+++ b/PyGLM/types/mvec/uint/mvec4.h
@@ -41,12 +41,12 @@ static PyNumberMethods humvec4NumMethods = {
 	(unaryfunc)mvec_pos<4, glm::u32>, //nb_positive
 	(unaryfunc)mvec_abs<4, glm::u32>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)mvec_invert<4, glm::u32>, //nb_invert
+	(binaryfunc)mvec_lshift<4, glm::u32>, //nb_lshift
+	(binaryfunc)mvec_rshift<4, glm::u32>, //nb_rshift
+	(binaryfunc)mvec_and<4, glm::u32>, //nb_and
+	(binaryfunc)mvec_xor<4, glm::u32>, //nb_xor
+	(binaryfunc)mvec_or<4, glm::u32>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -55,11 +55,11 @@ static PyNumberMethods humvec4NumMethods = {
 	(binaryfunc)mvec_imul<4, glm::u32>, //nb_inplace_multiply
 	0, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)mvec_ilshift<4, glm::u32>, //nb_inplace_lshift
+	(binaryfunc)mvec_irshift<4, glm::u32>, //nb_inplace_rshift
+	(binaryfunc)mvec_iand<4, glm::u32>, //nb_inplace_and
+	(binaryfunc)mvec_ixor<4, glm::u32>, //nb_inplace_xor
+	(binaryfunc)mvec_ior<4, glm::u32>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)mvec_div<4, glm::u32>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/forward_declarations.h b/PyGLM/types/vec/forward_declarations.h
index f9fb60e..1d1568b 100644
--- a/PyGLM/types/vec/forward_declarations.h
+++ b/PyGLM/types/vec/forward_declarations.h
@@ -79,6 +79,21 @@ static PyObject * vec_mod(PyObject *obj1, PyObject *obj2);
 template<int L, typename T>
 static PyObject * vec_divmod(PyObject *obj1, PyObject *obj2);
 
+template<int L, typename T>
+static PyObject* vec_lshift(PyObject* obj1, PyObject* obj2);
+
+template<int L, typename T>
+static PyObject* vec_rshift(PyObject* obj1, PyObject* obj2);
+
+template<int L, typename T>
+static PyObject* vec_and(PyObject* obj1, PyObject* obj2);
+
+template<int L, typename T>
+static PyObject* vec_xor(PyObject* obj1, PyObject* obj2);
+
+template<int L, typename T>
+static PyObject * vec_or(PyObject* obj1, PyObject* obj2);
+
 template<int L, typename T>
 static PyObject * vec_pow(PyObject * obj1, PyObject * obj2, PyObject * obj3);
 
@@ -94,6 +109,9 @@ static PyObject * vec_pos(vec<L, T> *obj);
 template<int L, typename T>
 static PyObject * vec_abs(vec<L, T> *obj);
 
+template<int L, typename T>
+static PyObject* vec_invert(vec<L, T>* obj);
+
 static PyObject* vec_matmul(PyObject* obj1, PyObject* obj2);
 
 template<int L, typename T>
@@ -114,6 +132,21 @@ static PyObject* bvec_imul(vec<L, bool>* self, PyObject* obj);
 template<int L, typename T>
 static PyObject * vec_imod(vec<L, T>* self, PyObject *obj);
 
+template<int L, typename T>
+static PyObject* vec_ilshift(vec<L, T>* self, PyObject* obj);
+
+template<int L, typename T>
+static PyObject* vec_irshift(vec<L, T>* self, PyObject* obj);
+
+template<int L, typename T>
+static PyObject* vec_iand(vec<L, T>* self, PyObject* obj);
+
+template<int L, typename T>
+static PyObject* vec_ixor(vec<L, T>* self, PyObject* obj);
+
+template<int L, typename T>
+static PyObject* vec_ior(vec<L, T>* self, PyObject* obj);
+
 template<int L, typename T>
 static PyObject * vec_ipow(vec<L, T>* self, PyObject * obj2, PyObject * obj3);
 
diff --git a/PyGLM/types/vec/int16/vec1.h b/PyGLM/types/vec/int16/vec1.h
index b480f0a..b023518 100644
--- a/PyGLM/types/vec/int16/vec1.h
+++ b/PyGLM/types/vec/int16/vec1.h
@@ -46,12 +46,12 @@ static PyNumberMethods hi16vec1NumMethods = {
 	(unaryfunc)vec_pos<1, glm::i16>, //nb_positive
 	(unaryfunc)vec_abs<1, glm::i16>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<1, glm::i16>, //nb_invert
+	(binaryfunc)vec_lshift<1, glm::i16>, //nb_lshift
+	(binaryfunc)vec_rshift<1, glm::i16>, //nb_rshift
+	(binaryfunc)vec_and<1, glm::i16>, //nb_and
+	(binaryfunc)vec_xor<1, glm::i16>, //nb_xor
+	(binaryfunc)vec_or<1, glm::i16>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -60,11 +60,11 @@ static PyNumberMethods hi16vec1NumMethods = {
 	(binaryfunc)vec_imul<1, glm::i16>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<1, glm::i16>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<1, glm::i16>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<1, glm::i16>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<1, glm::i16>, //nb_inplace_and
+	(binaryfunc)vec_ixor<1, glm::i16>, //nb_inplace_xor
+	(binaryfunc)vec_ior<1, glm::i16>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<1, glm::i16>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/int16/vec2.h b/PyGLM/types/vec/int16/vec2.h
index 4d06157..64d0352 100644
--- a/PyGLM/types/vec/int16/vec2.h
+++ b/PyGLM/types/vec/int16/vec2.h
@@ -47,12 +47,12 @@ static PyNumberMethods hi16vec2NumMethods = {
 	(unaryfunc)vec_pos<2, glm::i16>, //nb_positive
 	(unaryfunc)vec_abs<2, glm::i16>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<2, glm::i16>, //nb_invert
+	(binaryfunc)vec_lshift<2, glm::i16>, //nb_lshift
+	(binaryfunc)vec_rshift<2, glm::i16>, //nb_rshift
+	(binaryfunc)vec_and<2, glm::i16>, //nb_and
+	(binaryfunc)vec_xor<2, glm::i16>, //nb_xor
+	(binaryfunc)vec_or<2, glm::i16>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -61,11 +61,11 @@ static PyNumberMethods hi16vec2NumMethods = {
 	(binaryfunc)vec_imul<2, glm::i16>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<2, glm::i16>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<2, glm::i16>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<2, glm::i16>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<2, glm::i16>, //nb_inplace_and
+	(binaryfunc)vec_ixor<2, glm::i16>, //nb_inplace_xor
+	(binaryfunc)vec_ior<2, glm::i16>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<2, glm::i16>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/int16/vec3.h b/PyGLM/types/vec/int16/vec3.h
index 7513fbf..c8b05ec 100644
--- a/PyGLM/types/vec/int16/vec3.h
+++ b/PyGLM/types/vec/int16/vec3.h
@@ -48,12 +48,12 @@ static PyNumberMethods hi16vec3NumMethods = {
 	(unaryfunc)vec_pos<3, glm::i16>, //nb_positive
 	(unaryfunc)vec_abs<3, glm::i16>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<3, glm::i16>, //nb_invert
+	(binaryfunc)vec_lshift<3, glm::i16>, //nb_lshift
+	(binaryfunc)vec_rshift<3, glm::i16>, //nb_rshift
+	(binaryfunc)vec_and<3, glm::i16>, //nb_and
+	(binaryfunc)vec_xor<3, glm::i16>, //nb_xor
+	(binaryfunc)vec_or<3, glm::i16>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -62,11 +62,11 @@ static PyNumberMethods hi16vec3NumMethods = {
 	(binaryfunc)vec_imul<3, glm::i16>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<3, glm::i16>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<3, glm::i16>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<3, glm::i16>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<3, glm::i16>, //nb_inplace_and
+	(binaryfunc)vec_ixor<3, glm::i16>, //nb_inplace_xor
+	(binaryfunc)vec_ior<3, glm::i16>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<3, glm::i16>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/int16/vec4.h b/PyGLM/types/vec/int16/vec4.h
index 79d2e62..e63facf 100644
--- a/PyGLM/types/vec/int16/vec4.h
+++ b/PyGLM/types/vec/int16/vec4.h
@@ -49,12 +49,12 @@ static PyNumberMethods hi16vec4NumMethods = {
 	(unaryfunc)vec_pos<4, glm::i16>, //nb_positive
 	(unaryfunc)vec_abs<4, glm::i16>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<4, glm::i16>, //nb_invert
+	(binaryfunc)vec_lshift<4, glm::i16>, //nb_lshift
+	(binaryfunc)vec_rshift<4, glm::i16>, //nb_rshift
+	(binaryfunc)vec_and<4, glm::i16>, //nb_and
+	(binaryfunc)vec_xor<4, glm::i16>, //nb_xor
+	(binaryfunc)vec_or<4, glm::i16>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -63,11 +63,11 @@ static PyNumberMethods hi16vec4NumMethods = {
 	(binaryfunc)vec_imul<4, glm::i16>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<4, glm::i16>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<4, glm::i16>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<4, glm::i16>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<4, glm::i16>, //nb_inplace_and
+	(binaryfunc)vec_ixor<4, glm::i16>, //nb_inplace_xor
+	(binaryfunc)vec_ior<4, glm::i16>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<4, glm::i16>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/int32/vec1.h b/PyGLM/types/vec/int32/vec1.h
index 67e0759..caeba5a 100644
--- a/PyGLM/types/vec/int32/vec1.h
+++ b/PyGLM/types/vec/int32/vec1.h
@@ -46,12 +46,12 @@ static PyNumberMethods hivec1NumMethods = {
 	(unaryfunc)vec_pos<1, glm::i32>, //nb_positive
 	(unaryfunc)vec_abs<1, glm::i32>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<1, glm::i32>, //nb_invert
+	(binaryfunc)vec_lshift<1, glm::i32>, //nb_lshift
+	(binaryfunc)vec_rshift<1, glm::i32>, //nb_rshift
+	(binaryfunc)vec_and<1, glm::i32>, //nb_and
+	(binaryfunc)vec_xor<1, glm::i32>, //nb_xor
+	(binaryfunc)vec_or<1, glm::i32>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -60,11 +60,11 @@ static PyNumberMethods hivec1NumMethods = {
 	(binaryfunc)vec_imul<1, glm::i32>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<1, glm::i32>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<1, glm::i32>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<1, glm::i32>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<1, glm::i32>, //nb_inplace_and
+	(binaryfunc)vec_ixor<1, glm::i32>, //nb_inplace_xor
+	(binaryfunc)vec_ior<1, glm::i32>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<1, glm::i32>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/int32/vec2.h b/PyGLM/types/vec/int32/vec2.h
index 01fcbbd..412fe9c 100644
--- a/PyGLM/types/vec/int32/vec2.h
+++ b/PyGLM/types/vec/int32/vec2.h
@@ -47,12 +47,12 @@ static PyNumberMethods hivec2NumMethods = {
 	(unaryfunc)vec_pos<2, glm::i32>, //nb_positive
 	(unaryfunc)vec_abs<2, glm::i32>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<2, glm::i32>, //nb_invert
+	(binaryfunc)vec_lshift<2, glm::i32>, //nb_lshift
+	(binaryfunc)vec_rshift<2, glm::i32>, //nb_rshift
+	(binaryfunc)vec_and<2, glm::i32>, //nb_and
+	(binaryfunc)vec_xor<2, glm::i32>, //nb_xor
+	(binaryfunc)vec_or<2, glm::i32>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -61,11 +61,11 @@ static PyNumberMethods hivec2NumMethods = {
 	(binaryfunc)vec_imul<2, glm::i32>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<2, glm::i32>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<2, glm::i32>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<2, glm::i32>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<2, glm::i32>, //nb_inplace_and
+	(binaryfunc)vec_ixor<2, glm::i32>, //nb_inplace_xor
+	(binaryfunc)vec_ior<2, glm::i32>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<2, glm::i32>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/int32/vec3.h b/PyGLM/types/vec/int32/vec3.h
index 313f6bd..f36aed3 100644
--- a/PyGLM/types/vec/int32/vec3.h
+++ b/PyGLM/types/vec/int32/vec3.h
@@ -48,12 +48,12 @@ static PyNumberMethods hivec3NumMethods = {
 	(unaryfunc)vec_pos<3, glm::i32>, //nb_positive
 	(unaryfunc)vec_abs<3, glm::i32>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<3, glm::i32>, //nb_invert
+	(binaryfunc)vec_lshift<3, glm::i32>, //nb_lshift
+	(binaryfunc)vec_rshift<3, glm::i32>, //nb_rshift
+	(binaryfunc)vec_and<3, glm::i32>, //nb_and
+	(binaryfunc)vec_xor<3, glm::i32>, //nb_xor
+	(binaryfunc)vec_or<3, glm::i32>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -62,11 +62,11 @@ static PyNumberMethods hivec3NumMethods = {
 	(binaryfunc)vec_imul<3, glm::i32>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<3, glm::i32>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<3, glm::i32>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<3, glm::i32>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<3, glm::i32>, //nb_inplace_and
+	(binaryfunc)vec_ixor<3, glm::i32>, //nb_inplace_xor
+	(binaryfunc)vec_ior<3, glm::i32>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<3, glm::i32>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/int32/vec4.h b/PyGLM/types/vec/int32/vec4.h
index 0738b43..fed044c 100644
--- a/PyGLM/types/vec/int32/vec4.h
+++ b/PyGLM/types/vec/int32/vec4.h
@@ -49,12 +49,12 @@ static PyNumberMethods hivec4NumMethods = {
 	(unaryfunc)vec_pos<4, glm::i32>, //nb_positive
 	(unaryfunc)vec_abs<4, glm::i32>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<4, glm::i32>, //nb_invert
+	(binaryfunc)vec_lshift<4, glm::i32>, //nb_lshift
+	(binaryfunc)vec_rshift<4, glm::i32>, //nb_rshift
+	(binaryfunc)vec_and<4, glm::i32>, //nb_and
+	(binaryfunc)vec_xor<4, glm::i32>, //nb_xor
+	(binaryfunc)vec_or<4, glm::i32>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -63,11 +63,11 @@ static PyNumberMethods hivec4NumMethods = {
 	(binaryfunc)vec_imul<4, glm::i32>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<4, glm::i32>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<4, glm::i32>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<4, glm::i32>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<4, glm::i32>, //nb_inplace_and
+	(binaryfunc)vec_ixor<4, glm::i32>, //nb_inplace_xor
+	(binaryfunc)vec_ior<4, glm::i32>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<4, glm::i32>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/int64/vec1.h b/PyGLM/types/vec/int64/vec1.h
index 6a8b62d..9eca6f8 100644
--- a/PyGLM/types/vec/int64/vec1.h
+++ b/PyGLM/types/vec/int64/vec1.h
@@ -46,12 +46,12 @@ static PyNumberMethods hi64vec1NumMethods = {
 	(unaryfunc)vec_pos<1, glm::i64>, //nb_positive
 	(unaryfunc)vec_abs<1, glm::i64>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<1, glm::i64>, //nb_invert
+	(binaryfunc)vec_lshift<1, glm::i64>, //nb_lshift
+	(binaryfunc)vec_rshift<1, glm::i64>, //nb_rshift
+	(binaryfunc)vec_and<1, glm::i64>, //nb_and
+	(binaryfunc)vec_xor<1, glm::i64>, //nb_xor
+	(binaryfunc)vec_or<1, glm::i64>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -60,11 +60,11 @@ static PyNumberMethods hi64vec1NumMethods = {
 	(binaryfunc)vec_imul<1, glm::i64>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<1, glm::i64>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<1, glm::i64>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<1, glm::i64>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<1, glm::i64>, //nb_inplace_and
+	(binaryfunc)vec_ixor<1, glm::i64>, //nb_inplace_xor
+	(binaryfunc)vec_ior<1, glm::i64>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<1, glm::i64>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/int64/vec2.h b/PyGLM/types/vec/int64/vec2.h
index 38f40fc..30c8ed9 100644
--- a/PyGLM/types/vec/int64/vec2.h
+++ b/PyGLM/types/vec/int64/vec2.h
@@ -47,12 +47,12 @@ static PyNumberMethods hi64vec2NumMethods = {
 	(unaryfunc)vec_pos<2, glm::i64>, //nb_positive
 	(unaryfunc)vec_abs<2, glm::i64>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<2, glm::i64>, //nb_invert
+	(binaryfunc)vec_lshift<2, glm::i64>, //nb_lshift
+	(binaryfunc)vec_rshift<2, glm::i64>, //nb_rshift
+	(binaryfunc)vec_and<2, glm::i64>, //nb_and
+	(binaryfunc)vec_xor<2, glm::i64>, //nb_xor
+	(binaryfunc)vec_or<2, glm::i64>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -61,11 +61,11 @@ static PyNumberMethods hi64vec2NumMethods = {
 	(binaryfunc)vec_imul<2, glm::i64>, //nb_inplace_multiply
 	(binaryfunc)vec_mod<2, glm::i64>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<2, glm::i64>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<2, glm::i64>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<2, glm::i64>, //nb_inplace_and
+	(binaryfunc)vec_ixor<2, glm::i64>, //nb_inplace_xor
+	(binaryfunc)vec_ior<2, glm::i64>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<2, glm::i64>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/int64/vec3.h b/PyGLM/types/vec/int64/vec3.h
index 69d7d8b..2a216eb 100644
--- a/PyGLM/types/vec/int64/vec3.h
+++ b/PyGLM/types/vec/int64/vec3.h
@@ -48,12 +48,12 @@ static PyNumberMethods hi64vec3NumMethods = {
 	(unaryfunc)vec_pos<3, glm::i64>, //nb_positive
 	(unaryfunc)vec_abs<3, glm::i64>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<3, glm::i64>, //nb_invert
+	(binaryfunc)vec_lshift<3, glm::i64>, //nb_lshift
+	(binaryfunc)vec_rshift<3, glm::i64>, //nb_rshift
+	(binaryfunc)vec_and<3, glm::i64>, //nb_and
+	(binaryfunc)vec_xor<3, glm::i64>, //nb_xor
+	(binaryfunc)vec_or<3, glm::i64>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -62,11 +62,11 @@ static PyNumberMethods hi64vec3NumMethods = {
 	(binaryfunc)vec_imul<3, glm::i64>, //nb_inplace_multiply
 	(binaryfunc)vec_mod<3, glm::i64>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<3, glm::i64>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<3, glm::i64>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<3, glm::i64>, //nb_inplace_and
+	(binaryfunc)vec_ixor<3, glm::i64>, //nb_inplace_xor
+	(binaryfunc)vec_ior<3, glm::i64>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<3, glm::i64>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/int64/vec4.h b/PyGLM/types/vec/int64/vec4.h
index 93e8cd1..40c9f4d 100644
--- a/PyGLM/types/vec/int64/vec4.h
+++ b/PyGLM/types/vec/int64/vec4.h
@@ -49,12 +49,12 @@ static PyNumberMethods hi64vec4NumMethods = {
 	(unaryfunc)vec_pos<4, glm::i64>, //nb_positive
 	(unaryfunc)vec_abs<4, glm::i64>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<4, glm::i64>, //nb_invert
+	(binaryfunc)vec_lshift<4, glm::i64>, //nb_lshift
+	(binaryfunc)vec_rshift<4, glm::i64>, //nb_rshift
+	(binaryfunc)vec_and<4, glm::i64>, //nb_and
+	(binaryfunc)vec_xor<4, glm::i64>, //nb_xor
+	(binaryfunc)vec_or<4, glm::i64>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -63,11 +63,11 @@ static PyNumberMethods hi64vec4NumMethods = {
 	(binaryfunc)vec_imul<4, glm::i64>, //nb_inplace_multiply
 	(binaryfunc)vec_mod<4, glm::i64>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<4, glm::i64>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<4, glm::i64>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<4, glm::i64>, //nb_inplace_and
+	(binaryfunc)vec_ixor<4, glm::i64>, //nb_inplace_xor
+	(binaryfunc)vec_ior<4, glm::i64>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<4, glm::i64>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/int8/vec1.h b/PyGLM/types/vec/int8/vec1.h
index 60f26bb..a999dc5 100644
--- a/PyGLM/types/vec/int8/vec1.h
+++ b/PyGLM/types/vec/int8/vec1.h
@@ -46,12 +46,12 @@ static PyNumberMethods hi8vec1NumMethods = {
 	(unaryfunc)vec_pos<1, glm::i8>, //nb_positive
 	(unaryfunc)vec_abs<1, glm::i8>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<1, glm::i8>, //nb_invert
+	(binaryfunc)vec_lshift<1, glm::i8>, //nb_lshift
+	(binaryfunc)vec_rshift<1, glm::i8>, //nb_rshift
+	(binaryfunc)vec_and<1, glm::i8>, //nb_and
+	(binaryfunc)vec_xor<1, glm::i8>, //nb_xor
+	(binaryfunc)vec_or<1, glm::i8>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -60,11 +60,11 @@ static PyNumberMethods hi8vec1NumMethods = {
 	(binaryfunc)vec_imul<1, glm::i8>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<1, glm::i8>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<1, glm::i8>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<1, glm::i8>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<1, glm::i8>, //nb_inplace_and
+	(binaryfunc)vec_ixor<1, glm::i8>, //nb_inplace_xor
+	(binaryfunc)vec_ior<1, glm::i8>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<1, glm::i8>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/int8/vec2.h b/PyGLM/types/vec/int8/vec2.h
index 1522422..ba65d57 100644
--- a/PyGLM/types/vec/int8/vec2.h
+++ b/PyGLM/types/vec/int8/vec2.h
@@ -47,12 +47,12 @@ static PyNumberMethods hi8vec2NumMethods = {
 	(unaryfunc)vec_pos<2, glm::i8>, //nb_positive
 	(unaryfunc)vec_abs<2, glm::i8>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<2, glm::i8>, //nb_invert
+	(binaryfunc)vec_lshift<2, glm::i8>, //nb_lshift
+	(binaryfunc)vec_rshift<2, glm::i8>, //nb_rshift
+	(binaryfunc)vec_and<2, glm::i8>, //nb_and
+	(binaryfunc)vec_xor<2, glm::i8>, //nb_xor
+	(binaryfunc)vec_or<2, glm::i8>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -61,11 +61,11 @@ static PyNumberMethods hi8vec2NumMethods = {
 	(binaryfunc)vec_imul<2, glm::i8>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<2, glm::i8>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<2, glm::i8>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<2, glm::i8>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<2, glm::i8>, //nb_inplace_and
+	(binaryfunc)vec_ixor<2, glm::i8>, //nb_inplace_xor
+	(binaryfunc)vec_ior<2, glm::i8>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<2, glm::i8>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/int8/vec3.h b/PyGLM/types/vec/int8/vec3.h
index c7737fb..5ac29c8 100644
--- a/PyGLM/types/vec/int8/vec3.h
+++ b/PyGLM/types/vec/int8/vec3.h
@@ -48,12 +48,12 @@ static PyNumberMethods hi8vec3NumMethods = {
 	(unaryfunc)vec_pos<3, glm::i8>, //nb_positive
 	(unaryfunc)vec_abs<3, glm::i8>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<3, glm::i8>, //nb_invert
+	(binaryfunc)vec_lshift<3, glm::i8>, //nb_lshift
+	(binaryfunc)vec_rshift<3, glm::i8>, //nb_rshift
+	(binaryfunc)vec_and<3, glm::i8>, //nb_and
+	(binaryfunc)vec_xor<3, glm::i8>, //nb_xor
+	(binaryfunc)vec_or<3, glm::i8>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -62,11 +62,11 @@ static PyNumberMethods hi8vec3NumMethods = {
 	(binaryfunc)vec_imul<3, glm::i8>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<3, glm::i8>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<3, glm::i8>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<3, glm::i8>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<3, glm::i8>, //nb_inplace_and
+	(binaryfunc)vec_ixor<3, glm::i8>, //nb_inplace_xor
+	(binaryfunc)vec_ior<3, glm::i8>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<3, glm::i8>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/int8/vec4.h b/PyGLM/types/vec/int8/vec4.h
index 303a7eb..48e27a3 100644
--- a/PyGLM/types/vec/int8/vec4.h
+++ b/PyGLM/types/vec/int8/vec4.h
@@ -49,12 +49,12 @@ static PyNumberMethods hi8vec4NumMethods = {
 	(unaryfunc)vec_pos<4, glm::i8>, //nb_positive
 	(unaryfunc)vec_abs<4, glm::i8>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<4, glm::i8>, //nb_invert
+	(binaryfunc)vec_lshift<4, glm::i8>, //nb_lshift
+	(binaryfunc)vec_rshift<4, glm::i8>, //nb_rshift
+	(binaryfunc)vec_and<4, glm::i8>, //nb_and
+	(binaryfunc)vec_xor<4, glm::i8>, //nb_xor
+	(binaryfunc)vec_or<4, glm::i8>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -63,11 +63,11 @@ static PyNumberMethods hi8vec4NumMethods = {
 	(binaryfunc)vec_imul<4, glm::i8>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<4, glm::i8>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<4, glm::i8>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<4, glm::i8>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<4, glm::i8>, //nb_inplace_and
+	(binaryfunc)vec_ixor<4, glm::i8>, //nb_inplace_xor
+	(binaryfunc)vec_ior<4, glm::i8>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<4, glm::i8>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/uint16/vec1.h b/PyGLM/types/vec/uint16/vec1.h
index 02bcd03..f58298c 100644
--- a/PyGLM/types/vec/uint16/vec1.h
+++ b/PyGLM/types/vec/uint16/vec1.h
@@ -46,12 +46,12 @@ static PyNumberMethods hu16vec1NumMethods = {
 	(unaryfunc)vec_pos<1, glm::u16>, //nb_positive
 	(unaryfunc)vec_abs<1, glm::u16>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<1, glm::u16>, //nb_invert
+	(binaryfunc)vec_lshift<1, glm::u16>, //nb_lshift
+	(binaryfunc)vec_rshift<1, glm::u16>, //nb_rshift
+	(binaryfunc)vec_and<1, glm::u16>, //nb_and
+	(binaryfunc)vec_xor<1, glm::u16>, //nb_xor
+	(binaryfunc)vec_or<1, glm::u16>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -60,11 +60,11 @@ static PyNumberMethods hu16vec1NumMethods = {
 	(binaryfunc)vec_imul<1, glm::u16>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<1, glm::u16>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<1, glm::u16>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<1, glm::u16>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<1, glm::u16>, //nb_inplace_and
+	(binaryfunc)vec_ixor<1, glm::u16>, //nb_inplace_xor
+	(binaryfunc)vec_ior<1, glm::u16>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<1, glm::u16>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/uint16/vec2.h b/PyGLM/types/vec/uint16/vec2.h
index 8599dd4..5055efd 100644
--- a/PyGLM/types/vec/uint16/vec2.h
+++ b/PyGLM/types/vec/uint16/vec2.h
@@ -47,12 +47,12 @@ static PyNumberMethods hu16vec2NumMethods = {
 	(unaryfunc)vec_pos<2, glm::u16>, //nb_positive
 	(unaryfunc)vec_abs<2, glm::u16>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<2, glm::u16>, //nb_invert
+	(binaryfunc)vec_lshift<2, glm::u16>, //nb_lshift
+	(binaryfunc)vec_rshift<2, glm::u16>, //nb_rshift
+	(binaryfunc)vec_and<2, glm::u16>, //nb_and
+	(binaryfunc)vec_xor<2, glm::u16>, //nb_xor
+	(binaryfunc)vec_or<2, glm::u16>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -61,11 +61,11 @@ static PyNumberMethods hu16vec2NumMethods = {
 	(binaryfunc)vec_imul<2, glm::u16>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<2, glm::u16>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<2, glm::u16>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<2, glm::u16>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<2, glm::u16>, //nb_inplace_and
+	(binaryfunc)vec_ixor<2, glm::u16>, //nb_inplace_xor
+	(binaryfunc)vec_ior<2, glm::u16>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<2, glm::u16>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/uint16/vec3.h b/PyGLM/types/vec/uint16/vec3.h
index 4c97374..e161fd3 100644
--- a/PyGLM/types/vec/uint16/vec3.h
+++ b/PyGLM/types/vec/uint16/vec3.h
@@ -48,12 +48,12 @@ static PyNumberMethods hu16vec3NumMethods = {
 	(unaryfunc)vec_pos<3, glm::u16>, //nb_positive
 	(unaryfunc)vec_abs<3, glm::u16>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<3, glm::u16>, //nb_invert
+	(binaryfunc)vec_lshift<3, glm::u16>, //nb_lshift
+	(binaryfunc)vec_rshift<3, glm::u16>, //nb_rshift
+	(binaryfunc)vec_and<3, glm::u16>, //nb_and
+	(binaryfunc)vec_xor<3, glm::u16>, //nb_xor
+	(binaryfunc)vec_or<3, glm::u16>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -62,11 +62,11 @@ static PyNumberMethods hu16vec3NumMethods = {
 	(binaryfunc)vec_imul<3, glm::u16>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<3, glm::u16>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<3, glm::u16>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<3, glm::u16>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<3, glm::u16>, //nb_inplace_and
+	(binaryfunc)vec_ixor<3, glm::u16>, //nb_inplace_xor
+	(binaryfunc)vec_ior<3, glm::u16>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<3, glm::u16>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/uint16/vec4.h b/PyGLM/types/vec/uint16/vec4.h
index 335e616..dfce235 100644
--- a/PyGLM/types/vec/uint16/vec4.h
+++ b/PyGLM/types/vec/uint16/vec4.h
@@ -49,12 +49,12 @@ static PyNumberMethods hu16vec4NumMethods = {
 	(unaryfunc)vec_pos<4, glm::u16>, //nb_positive
 	(unaryfunc)vec_abs<4, glm::u16>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<4, glm::u16>, //nb_invert
+	(binaryfunc)vec_lshift<4, glm::u16>, //nb_lshift
+	(binaryfunc)vec_rshift<4, glm::u16>, //nb_rshift
+	(binaryfunc)vec_and<4, glm::u16>, //nb_and
+	(binaryfunc)vec_xor<4, glm::u16>, //nb_xor
+	(binaryfunc)vec_or<4, glm::u16>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -63,11 +63,11 @@ static PyNumberMethods hu16vec4NumMethods = {
 	(binaryfunc)vec_imul<4, glm::u16>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<4, glm::u16>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<4, glm::u16>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<4, glm::u16>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<4, glm::u16>, //nb_inplace_and
+	(binaryfunc)vec_ixor<4, glm::u16>, //nb_inplace_xor
+	(binaryfunc)vec_ior<4, glm::u16>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<4, glm::u16>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/uint32/vec1.h b/PyGLM/types/vec/uint32/vec1.h
index 7537f1b..5dc485b 100644
--- a/PyGLM/types/vec/uint32/vec1.h
+++ b/PyGLM/types/vec/uint32/vec1.h
@@ -46,12 +46,12 @@ static PyNumberMethods huvec1NumMethods = {
 	(unaryfunc)vec_pos<1, glm::u32>, //nb_positive
 	(unaryfunc)vec_abs<1, glm::u32>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<1, glm::u32>, //nb_invert
+	(binaryfunc)vec_lshift<1, glm::u32>, //nb_lshift
+	(binaryfunc)vec_rshift<1, glm::u32>, //nb_rshift
+	(binaryfunc)vec_and<1, glm::u32>, //nb_and
+	(binaryfunc)vec_xor<1, glm::u32>, //nb_xor
+	(binaryfunc)vec_or<1, glm::u32>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -60,11 +60,11 @@ static PyNumberMethods huvec1NumMethods = {
 	(binaryfunc)vec_imul<1, glm::u32>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<1, glm::u32>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<1, glm::u32>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<1, glm::u32>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<1, glm::u32>, //nb_inplace_and
+	(binaryfunc)vec_ixor<1, glm::u32>, //nb_inplace_xor
+	(binaryfunc)vec_ior<1, glm::u32>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<1, glm::u32>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/uint32/vec2.h b/PyGLM/types/vec/uint32/vec2.h
index 9e106ed..99871e1 100644
--- a/PyGLM/types/vec/uint32/vec2.h
+++ b/PyGLM/types/vec/uint32/vec2.h
@@ -47,12 +47,12 @@ static PyNumberMethods huvec2NumMethods = {
 	(unaryfunc)vec_pos<2, glm::u32>, //nb_positive
 	(unaryfunc)vec_abs<2, glm::u32>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<2, glm::u32>, //nb_invert
+	(binaryfunc)vec_lshift<2, glm::u32>, //nb_lshift
+	(binaryfunc)vec_rshift<2, glm::u32>, //nb_rshift
+	(binaryfunc)vec_and<2, glm::u32>, //nb_and
+	(binaryfunc)vec_xor<2, glm::u32>, //nb_xor
+	(binaryfunc)vec_or<2, glm::u32>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -61,11 +61,11 @@ static PyNumberMethods huvec2NumMethods = {
 	(binaryfunc)vec_imul<2, glm::u32>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<2, glm::u32>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<2, glm::u32>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<2, glm::u32>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<2, glm::u32>, //nb_inplace_and
+	(binaryfunc)vec_ixor<2, glm::u32>, //nb_inplace_xor
+	(binaryfunc)vec_ior<2, glm::u32>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<2, glm::u32>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/uint32/vec3.h b/PyGLM/types/vec/uint32/vec3.h
index 5c3b10b..3ca990e 100644
--- a/PyGLM/types/vec/uint32/vec3.h
+++ b/PyGLM/types/vec/uint32/vec3.h
@@ -48,12 +48,12 @@ static PyNumberMethods huvec3NumMethods = {
 	(unaryfunc)vec_pos<3, glm::u32>, //nb_positive
 	(unaryfunc)vec_abs<3, glm::u32>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<3, glm::u32>, //nb_invert
+	(binaryfunc)vec_lshift<3, glm::u32>, //nb_lshift
+	(binaryfunc)vec_rshift<3, glm::u32>, //nb_rshift
+	(binaryfunc)vec_and<3, glm::u32>, //nb_and
+	(binaryfunc)vec_xor<3, glm::u32>, //nb_xor
+	(binaryfunc)vec_or<3, glm::u32>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -62,11 +62,11 @@ static PyNumberMethods huvec3NumMethods = {
 	(binaryfunc)vec_imul<3, glm::u32>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<3, glm::u32>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<3, glm::u32>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<3, glm::u32>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<3, glm::u32>, //nb_inplace_and
+	(binaryfunc)vec_ixor<3, glm::u32>, //nb_inplace_xor
+	(binaryfunc)vec_ior<3, glm::u32>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<3, glm::u32>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/uint32/vec4.h b/PyGLM/types/vec/uint32/vec4.h
index 9c5824e..2321ec1 100644
--- a/PyGLM/types/vec/uint32/vec4.h
+++ b/PyGLM/types/vec/uint32/vec4.h
@@ -49,12 +49,12 @@ static PyNumberMethods huvec4NumMethods = {
 	(unaryfunc)vec_pos<4, glm::u32>, //nb_positive
 	(unaryfunc)vec_abs<4, glm::u32>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<4, glm::u32>, //nb_invert
+	(binaryfunc)vec_lshift<4, glm::u32>, //nb_lshift
+	(binaryfunc)vec_rshift<4, glm::u32>, //nb_rshift
+	(binaryfunc)vec_and<4, glm::u32>, //nb_and
+	(binaryfunc)vec_xor<4, glm::u32>, //nb_xor
+	(binaryfunc)vec_or<4, glm::u32>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -63,11 +63,11 @@ static PyNumberMethods huvec4NumMethods = {
 	(binaryfunc)vec_imul<4, glm::u32>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<4, glm::u32>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<4, glm::u32>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<4, glm::u32>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<4, glm::u32>, //nb_inplace_and
+	(binaryfunc)vec_ixor<4, glm::u32>, //nb_inplace_xor
+	(binaryfunc)vec_ior<4, glm::u32>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<4, glm::u32>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/uint64/vec1.h b/PyGLM/types/vec/uint64/vec1.h
index 0067d12..4f2514a 100644
--- a/PyGLM/types/vec/uint64/vec1.h
+++ b/PyGLM/types/vec/uint64/vec1.h
@@ -46,12 +46,12 @@ static PyNumberMethods hu64vec1NumMethods = {
 	(unaryfunc)vec_pos<1, glm::u64>, //nb_positive
 	(unaryfunc)vec_abs<1, glm::u64>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<1, glm::u64>, //nb_invert
+	(binaryfunc)vec_lshift<1, glm::u64>, //nb_lshift
+	(binaryfunc)vec_rshift<1, glm::u64>, //nb_rshift
+	(binaryfunc)vec_and<1, glm::u64>, //nb_and
+	(binaryfunc)vec_xor<1, glm::u64>, //nb_xor
+	(binaryfunc)vec_or<1, glm::u64>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -60,11 +60,11 @@ static PyNumberMethods hu64vec1NumMethods = {
 	(binaryfunc)vec_imul<1, glm::u64>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<1, glm::u64>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<1, glm::u64>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<1, glm::u64>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<1, glm::u64>, //nb_inplace_and
+	(binaryfunc)vec_ixor<1, glm::u64>, //nb_inplace_xor
+	(binaryfunc)vec_ior<1, glm::u64>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<1, glm::u64>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/uint64/vec2.h b/PyGLM/types/vec/uint64/vec2.h
index 1258a43..52f94be 100644
--- a/PyGLM/types/vec/uint64/vec2.h
+++ b/PyGLM/types/vec/uint64/vec2.h
@@ -47,12 +47,12 @@ static PyNumberMethods hu64vec2NumMethods = {
 	(unaryfunc)vec_pos<2, glm::u64>, //nb_positive
 	(unaryfunc)vec_abs<2, glm::u64>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<2, glm::u64>, //nb_invert
+	(binaryfunc)vec_lshift<2, glm::u64>, //nb_lshift
+	(binaryfunc)vec_rshift<2, glm::u64>, //nb_rshift
+	(binaryfunc)vec_and<2, glm::u64>, //nb_and
+	(binaryfunc)vec_xor<2, glm::u64>, //nb_xor
+	(binaryfunc)vec_or<2, glm::u64>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -61,11 +61,11 @@ static PyNumberMethods hu64vec2NumMethods = {
 	(binaryfunc)vec_imul<2, glm::u64>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<2, glm::u64>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<2, glm::u64>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<2, glm::u64>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<2, glm::u64>, //nb_inplace_and
+	(binaryfunc)vec_ixor<2, glm::u64>, //nb_inplace_xor
+	(binaryfunc)vec_ior<2, glm::u64>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<2, glm::u64>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/uint64/vec3.h b/PyGLM/types/vec/uint64/vec3.h
index ae97582..a918834 100644
--- a/PyGLM/types/vec/uint64/vec3.h
+++ b/PyGLM/types/vec/uint64/vec3.h
@@ -48,12 +48,12 @@ static PyNumberMethods hu64vec3NumMethods = {
 	(unaryfunc)vec_pos<3, glm::u64>, //nb_positive
 	(unaryfunc)vec_abs<3, glm::u64>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<3, glm::u64>, //nb_invert
+	(binaryfunc)vec_lshift<3, glm::u64>, //nb_lshift
+	(binaryfunc)vec_rshift<3, glm::u64>, //nb_rshift
+	(binaryfunc)vec_and<3, glm::u64>, //nb_and
+	(binaryfunc)vec_xor<3, glm::u64>, //nb_xor
+	(binaryfunc)vec_or<3, glm::u64>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -62,11 +62,11 @@ static PyNumberMethods hu64vec3NumMethods = {
 	(binaryfunc)vec_imul<3, glm::u64>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<3, glm::u64>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<3, glm::u64>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<3, glm::u64>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<3, glm::u64>, //nb_inplace_and
+	(binaryfunc)vec_ixor<3, glm::u64>, //nb_inplace_xor
+	(binaryfunc)vec_ior<3, glm::u64>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<3, glm::u64>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/uint64/vec4.h b/PyGLM/types/vec/uint64/vec4.h
index 287357c..0ccf775 100644
--- a/PyGLM/types/vec/uint64/vec4.h
+++ b/PyGLM/types/vec/uint64/vec4.h
@@ -49,12 +49,12 @@ static PyNumberMethods hu64vec4NumMethods = {
 	(unaryfunc)vec_pos<4, glm::u64>, //nb_positive
 	(unaryfunc)vec_abs<4, glm::u64>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<4, glm::u64>, //nb_invert
+	(binaryfunc)vec_lshift<4, glm::u64>, //nb_lshift
+	(binaryfunc)vec_rshift<4, glm::u64>, //nb_rshift
+	(binaryfunc)vec_and<4, glm::u64>, //nb_and
+	(binaryfunc)vec_xor<4, glm::u64>, //nb_xor
+	(binaryfunc)vec_or<4, glm::u64>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -63,11 +63,11 @@ static PyNumberMethods hu64vec4NumMethods = {
 	(binaryfunc)vec_imul<4, glm::u64>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<4, glm::u64>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<4, glm::u64>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<4, glm::u64>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<4, glm::u64>, //nb_inplace_and
+	(binaryfunc)vec_ixor<4, glm::u64>, //nb_inplace_xor
+	(binaryfunc)vec_ior<4, glm::u64>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<4, glm::u64>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/uint8/vec1.h b/PyGLM/types/vec/uint8/vec1.h
index a3b6ab2..dd5205b 100644
--- a/PyGLM/types/vec/uint8/vec1.h
+++ b/PyGLM/types/vec/uint8/vec1.h
@@ -46,12 +46,12 @@ static PyNumberMethods hu8vec1NumMethods = {
 	(unaryfunc)vec_pos<1, glm::u8>, //nb_positive
 	(unaryfunc)vec_abs<1, glm::u8>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<1, glm::u8>, //nb_invert
+	(binaryfunc)vec_lshift<1, glm::u8>, //nb_lshift
+	(binaryfunc)vec_rshift<1, glm::u8>, //nb_rshift
+	(binaryfunc)vec_and<1, glm::u8>, //nb_and
+	(binaryfunc)vec_xor<1, glm::u8>, //nb_xor
+	(binaryfunc)vec_or<1, glm::u8>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -60,11 +60,11 @@ static PyNumberMethods hu8vec1NumMethods = {
 	(binaryfunc)vec_imul<1, glm::u8>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<1, glm::u8>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<1, glm::u8>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<1, glm::u8>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<1, glm::u8>, //nb_inplace_and
+	(binaryfunc)vec_ixor<1, glm::u8>, //nb_inplace_xor
+	(binaryfunc)vec_ior<1, glm::u8>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<1, glm::u8>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/uint8/vec2.h b/PyGLM/types/vec/uint8/vec2.h
index 0e5f74f..a9a6cea 100644
--- a/PyGLM/types/vec/uint8/vec2.h
+++ b/PyGLM/types/vec/uint8/vec2.h
@@ -47,12 +47,12 @@ static PyNumberMethods hu8vec2NumMethods = {
 	(unaryfunc)vec_pos<2, glm::u8>, //nb_positive
 	(unaryfunc)vec_abs<2, glm::u8>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<2, glm::u8>, //nb_invert
+	(binaryfunc)vec_lshift<2, glm::u8>, //nb_lshift
+	(binaryfunc)vec_rshift<2, glm::u8>, //nb_rshift
+	(binaryfunc)vec_and<2, glm::u8>, //nb_and
+	(binaryfunc)vec_xor<2, glm::u8>, //nb_xor
+	(binaryfunc)vec_or<2, glm::u8>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -61,11 +61,11 @@ static PyNumberMethods hu8vec2NumMethods = {
 	(binaryfunc)vec_imul<2, glm::u8>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<2, glm::u8>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<2, glm::u8>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<2, glm::u8>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<2, glm::u8>, //nb_inplace_and
+	(binaryfunc)vec_ixor<2, glm::u8>, //nb_inplace_xor
+	(binaryfunc)vec_ior<2, glm::u8>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<2, glm::u8>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/uint8/vec3.h b/PyGLM/types/vec/uint8/vec3.h
index 8138962..ed44ec8 100644
--- a/PyGLM/types/vec/uint8/vec3.h
+++ b/PyGLM/types/vec/uint8/vec3.h
@@ -48,12 +48,12 @@ static PyNumberMethods hu8vec3NumMethods = {
 	(unaryfunc)vec_pos<3, glm::u8>, //nb_positive
 	(unaryfunc)vec_abs<3, glm::u8>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<3, glm::u8>, //nb_invert
+	(binaryfunc)vec_lshift<3, glm::u8>, //nb_lshift
+	(binaryfunc)vec_rshift<3, glm::u8>, //nb_rshift
+	(binaryfunc)vec_and<3, glm::u8>, //nb_and
+	(binaryfunc)vec_xor<3, glm::u8>, //nb_xor
+	(binaryfunc)vec_or<3, glm::u8>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -62,11 +62,11 @@ static PyNumberMethods hu8vec3NumMethods = {
 	(binaryfunc)vec_imul<3, glm::u8>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<3, glm::u8>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<3, glm::u8>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<3, glm::u8>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<3, glm::u8>, //nb_inplace_and
+	(binaryfunc)vec_ixor<3, glm::u8>, //nb_inplace_xor
+	(binaryfunc)vec_ior<3, glm::u8>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<3, glm::u8>,
 	0, //nb_inplace_floor_divide
diff --git a/PyGLM/types/vec/uint8/vec4.h b/PyGLM/types/vec/uint8/vec4.h
index badd642..222f006 100644
--- a/PyGLM/types/vec/uint8/vec4.h
+++ b/PyGLM/types/vec/uint8/vec4.h
@@ -49,12 +49,12 @@ static PyNumberMethods hu8vec4NumMethods = {
 	(unaryfunc)vec_pos<4, glm::u8>, //nb_positive
 	(unaryfunc)vec_abs<4, glm::u8>, //nb_absolute
 	0, //nb_bool
-	0, //nb_invert
-	0, //nb_lshift
-	0, //nb_rshift
-	0, //nb_and
-	0, //nb_xor
-	0, //nb_or
+	(unaryfunc)vec_invert<4, glm::u8>, //nb_invert
+	(binaryfunc)vec_lshift<4, glm::u8>, //nb_lshift
+	(binaryfunc)vec_rshift<4, glm::u8>, //nb_rshift
+	(binaryfunc)vec_and<4, glm::u8>, //nb_and
+	(binaryfunc)vec_xor<4, glm::u8>, //nb_xor
+	(binaryfunc)vec_or<4, glm::u8>, //nb_or
 	0, //nb_int
 	0, //nb_reserved
 	0, //nb_int
@@ -63,11 +63,11 @@ static PyNumberMethods hu8vec4NumMethods = {
 	(binaryfunc)vec_imul<4, glm::u8>, //nb_inplace_multiply
 	(binaryfunc)vec_imod<4, glm::u8>, //nb_inplace_remainder
 	0, //nb_inplace_power
-	0, //nb_inplace_lshift
-	0, //nb_inplace_rshift
-	0, //nb_inplace_and
-	0, //nb_inplace_xor
-	0, //nb_inplace_or
+	(binaryfunc)vec_ilshift<4, glm::u8>, //nb_inplace_lshift
+	(binaryfunc)vec_irshift<4, glm::u8>, //nb_inplace_rshift
+	(binaryfunc)vec_iand<4, glm::u8>, //nb_inplace_and
+	(binaryfunc)vec_ixor<4, glm::u8>, //nb_inplace_xor
+	(binaryfunc)vec_ior<4, glm::u8>, //nb_inplace_or
 	0, //nb_floor_divide
 	(binaryfunc)vec_div<4, glm::u8>,
 	0, //nb_inplace_floor_divide
diff --git a/wiki/Using-vectors.md b/wiki/Using-vectors.md
index 54fd325..2812f67 100644
--- a/wiki/Using-vectors.md
+++ b/wiki/Using-vectors.md
@@ -26,6 +26,11 @@
     *  [mod](#mod--operator)  
     *  [floordiv](#floordiv--operator)  
     *  [divmod](#divmod)  
+    *  [lshift](#lshift--operator)  
+    *  [rshift](#rshift--operator)  
+    *  [and](#and--operator)  
+    *  [or](#or--operator)  
+    *  [xor](#xor--operator)  
     *  [pow](#pow--operator)  
     *  [len](#len)  
     *  [getitem and setitem](#getitem-and-setitem--operator)  
@@ -159,6 +164,46 @@ Vectors support combined floor division and modulo operations with other vectors
 divmod1 = divmod(vec2(1, 2), vec2(4, 2)) # returns (vec2(0, 1), vec2(1, 0))
 divmod2 = divmod(vec2(1, 2), 4)          # returns (vec2(0, 0), vec2(1, 2))
  ```  
+### lshift \(``` << ``` operator\)  
+Integer vectors support the bitwise left shift operator\.&nbsp;&nbsp;  
+``` Python
+>>> ivec3(1, 2, 3) << 4
+ivec3( 16, 32, 48 )
+>>> uvec3(1, 2, 3) << uvec3(1, 2, 3)
+uvec3( 2, 8, 24 )
+ ```  
+### rshift \(``` >> ``` operator\)  
+Integer vectors support the bitwise right shift operator\.&nbsp;&nbsp;  
+``` Python
+>>> ivec3(16, 32, 48) >> 4
+ivec3( 1, 2, 3 )
+>>> uvec3(2, 8, 24) >> uvec3(1, 2, 3)
+uvec3( 1, 2, 3 )
+ ```  
+### and \(``` & ``` operator\)  
+Integer vectors support the bitwise and operator\.&nbsp;&nbsp;  
+``` Python
+>>> ivec3(1, 2, 3) & 2
+ivec3( 0, 2, 2 )
+>>> uvec3(1, 2, 3) & uvec3(3, 2, 1)
+uvec3( 1, 2, 1 )
+ ```  
+### or \(``` | ``` operator\)  
+Integer vectors support the bitwise or operator\.&nbsp;&nbsp;  
+``` Python
+>>> ivec3(1, 2, 3) | 2
+ivec3( 3, 2, 3 )
+>>> uvec3(1, 2, 3) | uvec3(6, 5, 4)
+uvec3( 7, 7, 7 )
+ ```  
+### xor \(``` ^ ``` operator\)  
+Integer vectors support the bitwise xor operator\.&nbsp;&nbsp;  
+``` Python
+>>> ivec3(1, 2, 3) ^ 2
+ivec3( 3, 0, 1 )
+>>> uvec3(1, 2, 3) ^ uvec3(3, 2, 1)
+uvec3( 2, 0, 2 )
+ ```  
 ### pow \(``` ** ``` operator\)  
 Vectors support pow operations with other vectors and numbers\.&nbsp;&nbsp;  
 ``` Python
diff --git a/wiki/Using-vectors.sb b/wiki/Using-vectors.sb
index 9ceeac4..00b6b42 100644
--- a/wiki/Using-vectors.sb
+++ b/wiki/Using-vectors.sb
@@ -24,6 +24,11 @@
 \--\ \url #mod--operator \mod\ url\
 \--\ \url #floordiv--operator \floordiv\ url\
 \--\ \url #divmod \divmod\ url\
+\--\ \url #lshift--operator \lshift\ url\
+\--\ \url #rshift--operator \rshift\ url\
+\--\ \url #and--operator \and\ url\
+\--\ \url #or--operator \or\ url\
+\--\ \url #xor--operator \xor\ url\
 \--\ \url #pow--operator \pow\ url\
 \--\ \url #len \len\ url\
 \--\ \url #getitem-and-setitem--operator \getitem and setitem\ url\
@@ -157,6 +162,46 @@ Vectors support combined floor division and modulo operations with other vectors
 divmod1 = divmod(vec2(1, 2), vec2(4, 2)) # returns (vec2(0, 1), vec2(1, 0))
 divmod2 = divmod(vec2(1, 2), 4)          # returns (vec2(0, 0), vec2(1, 2))
 \ code\
+\h3\lshift (\code\<<\code\ operator)\h3\
+Integer vectors support the bitwise left shift operator.  
+\code Python \
+>>> ivec3(1, 2, 3) << 4
+ivec3( 16, 32, 48 )
+>>> uvec3(1, 2, 3) << uvec3(1, 2, 3)
+uvec3( 2, 8, 24 )
+\ code\
+\h3\rshift (\code\>>\code\ operator)\h3\
+Integer vectors support the bitwise right shift operator.  
+\code Python \
+>>> ivec3(16, 32, 48) >> 4
+ivec3( 1, 2, 3 )
+>>> uvec3(2, 8, 24) >> uvec3(1, 2, 3)
+uvec3( 1, 2, 3 )
+\ code\
+\h3\and (\code\&\code\ operator)\h3\
+Integer vectors support the bitwise and operator.  
+\code Python \
+>>> ivec3(1, 2, 3) & 2
+ivec3( 0, 2, 2 )
+>>> uvec3(1, 2, 3) & uvec3(3, 2, 1)
+uvec3( 1, 2, 1 )
+\ code\
+\h3\or (\code\|\code\ operator)\h3\
+Integer vectors support the bitwise or operator.  
+\code Python \
+>>> ivec3(1, 2, 3) | 2
+ivec3( 3, 2, 3 )
+>>> uvec3(1, 2, 3) | uvec3(6, 5, 4)
+uvec3( 7, 7, 7 )
+\ code\
+\h3\xor (\code\^\code\ operator)\h3\
+Integer vectors support the bitwise xor operator.  
+\code Python \
+>>> ivec3(1, 2, 3) ^ 2
+ivec3( 3, 0, 1 )
+>>> uvec3(1, 2, 3) ^ uvec3(3, 2, 1)
+uvec3( 2, 0, 2 )
+\ code\
 \h3\pow (\code\**\code\ operator)\h3\
 Vectors support pow operations with other vectors and numbers.  
 \code Python \


Test patch:
diff --git a/PyGLM_test.py b/PyGLM_test.py
index b11b444..0b7d2bb 100644
--- a/PyGLM_test.py
+++ b/PyGLM_test.py
@@ -588,6 +588,13 @@ def test_abs():
         assert (abs(glm.array(obj)))[0] == abs(obj), obj
 #/abs #
 
+# invert #
+def test_invert():
+    for obj in gen_obj("#MV__iqsuIQSU"):
+        fassert(obj.__invert__, ())
+        assert (abs(glm.array(obj)))[0] == abs(obj), obj
+#/invert #
+
 # add #
 def test_add():
     for obj in gen_obj("#MV_M_Q__fFiqsuIQSUB"):
@@ -678,6 +685,41 @@ def test_divmod():
         fassert(obj.__divmod__, (1,))
 #/divmod #
 
+# lshift #
+def test_lshift():
+    for obj in gen_obj("#MV__iqsuIQSU"):
+        fassert(obj.__lshift__, (1,))
+        fassert(obj.__lshift__, (obj,))
+#/lshift #
+
+# rshift #
+def test_rshift():
+    for obj in gen_obj("#MV__iqsuIQSU"):
+        fassert(obj.__rshift__, (1,))
+        fassert(obj.__rshift__, (obj,))
+#/rshift #
+
+# and #
+def test_and():
+    for obj in gen_obj("#MV__iqsuIQSU"):
+        fassert(obj.__and__, (1,))
+        fassert(obj.__and__, (obj,))
+#/and #
+
+# or #
+def test_or():
+    for obj in gen_obj("#MV__iqsuIQSU"):
+        fassert(obj.__or__, (1,))
+        fassert(obj.__or__, (obj,))
+#/or #
+
+# xor #
+def test_xor():
+    for obj in gen_obj("#MV__iqsuIQSU"):
+        fassert(obj.__xor__, (1,))
+        fassert(obj.__xor__, (obj,))
+#/xor #
+
 # pow #
 def test_pow():
     for obj in gen_obj("#p#MV__fF"):