# Path: vulk/math/vector.py
# class Vector2(Vector, XMixin, YMixin):
#     '''Vector2 class represents a Vector in 2D space.
#     It has two components `x` and `y`.
#     '''
#     X = None
#     Y = None
#     Zero = None
# 
#     def __init__(self, values=None):
#         '''
#         *Parameters:*
# 
#         - `values`: `list` of 2 `float`
#         '''
#         if not values:
#             super().__init__([0, 0])
#         elif len(values) == 2:
#             super().__init__(values)
#         else:
#             raise ValueError("Vector2 needs 2 components")
# 
# Path: vulk/math/vector.py
# class Vector3(Vector, XMixin, YMixin, ZMixin):
#     '''Vector3 class represents a Vector in 3D space.
#     It has three components `x`, `y` and `z`.
#     '''
#     X = None
#     Y = None
#     Z = None
#     Zero = None
# 
#     def __init__(self, values=None):
#         '''
#         *Parameters:*
# 
#         - `values`: `list` of 3 `float`
#         '''
#         if not values:
#             super().__init__([0, 0, 0])
#         elif len(values) == 3:
#             super().__init__(values)
#         else:
#             raise ValueError("Vector3 needs 3 components")
# 
#         # tmp properties used during computation
#         self.tmp_v4 = Vector4()
# 
#     def mul(self, vector):
#         '''Multiply this vector by `vector`.
# 
#         *Parameters:*
# 
#         - `vector`: `Vector3`
#         '''
#         # TODO: To test and valid
#         self._values *= vector.values
# 
#     def mul2(self, matrix):
#         '''Multiply this vector by a `Matrix4`
# 
#         *Parameters:*
# 
#         - `matrix`: `Matrix4`
#         '''
#         self.tmp_v4.set2(self).mul2(matrix)
#         self._values[:] = self.tmp_v4.values[0:3]
#         return self
# 
#     def prj(self, matrix):
#         '''
#         Project this vector to the `matrix` parameter.
#         It's just a multiplication followed by a division by w.
# 
# 
# 
#         *Parameters:*
# 
#         - `matrix`: `Matrix4`
#         '''
#         self.tmp_v4.set2(self).mul2(matrix).norw()
#         self._values[:] = self.tmp_v4.values[0:3]
# 
#     def set(self, x, y, z):
#         '''Set values of this vector
# 
#         *Parameters:*
# 
#         - `x`, `y`, `z`: `float`
#         '''
#         self._values[0] = x
#         self._values[1] = y
#         self._values[2] = z
# 
#     def set2(self, vector):
#         '''Set values of this vector
# 
#         *Parameters:*
# 
#         - `vector`: `Vector3`
#         '''
#         self.set(vector.x, vector.y, vector.z)


from vulk.math.vector import Vector2
from vulk.math.vector import Vector3

    vector = Vector2(1, 2)
    for t in zip(vector, [1, 2]):
        assert t[0] == t[1]


def test_operations_vector3():
    # Add
    assert Vector3(1, 2, 3) + 2 == Vector3(3, 4, 5)
    assert Vector3(1, 2, 3) + (3, 2, 1) == Vector3(4, 4, 4)
    assert Vector3(1, 2, 3) + Vector3(3, 2, 1) == Vector3(4, 4, 4)

    # Sub
    assert Vector3(1, 2, 3) - 2 == Vector3(-1, 0, 1)
    assert Vector3(1, 2, 3) - (3, 2, 1) == Vector3(-2, 0, 2)
    assert Vector3(1, 2, 3) - Vector3(3, 2, 1) == Vector3(-2, 0, 2)

    # Mul
    assert Vector3(1, 2, 3) * 2 == Vector3(2, 4, 6)
    assert Vector3(1, 2, 3) * (3, 2, 1) == Vector3(3, 4, 3)
    assert Vector3(1, 2, 3) * Vector3(3, 2, 1) == Vector3(3, 4, 3)

    # Div
    assert Vector3(0, 2, 4) / 2 == Vector3(0, 1, 2)
    assert Vector3(0, 2, 4) / (3, 2, 1) == Vector3(0, 1, 4)
    assert Vector3(0, 2, 4) / Vector3(3, 2, 1) == Vector3(0, 1, 4)


def test_operations_vector2():
    # Add

# Path: vulk/math/vector.py
# class Vector2(Vector, XMixin, YMixin):
#     '''Vector2 class represents a Vector in 2D space.
#     It has two components `x` and `y`.
#     '''
#     X = None
#     Y = None
#     Zero = None
# 
#     def __init__(self, values=None):
#         '''
#         *Parameters:*
# 
#         - `values`: `list` of 2 `float`
#         '''
#         if not values:
#             super().__init__([0, 0])
#         elif len(values) == 2:
#             super().__init__(values)
#         else:
#             raise ValueError("Vector2 needs 2 components")
# 
# Path: vulk/math/vector.py
# class Vector3(Vector, XMixin, YMixin, ZMixin):
#     '''Vector3 class represents a Vector in 3D space.
#     It has three components `x`, `y` and `z`.
#     '''
#     X = None
#     Y = None
#     Z = None
#     Zero = None
# 
#     def __init__(self, values=None):
#         '''
#         *Parameters:*
# 
#         - `values`: `list` of 3 `float`
#         '''
#         if not values:
#             super().__init__([0, 0, 0])
#         elif len(values) == 3:
#             super().__init__(values)
#         else:
#             raise ValueError("Vector3 needs 3 components")
# 
#         # tmp properties used during computation
#         self.tmp_v4 = Vector4()
# 
#     def mul(self, vector):
#         '''Multiply this vector by `vector`.
# 
#         *Parameters:*
# 
#         - `vector`: `Vector3`
#         '''
#         # TODO: To test and valid
#         self._values *= vector.values
# 
#     def mul2(self, matrix):
#         '''Multiply this vector by a `Matrix4`
# 
#         *Parameters:*
# 
#         - `matrix`: `Matrix4`
#         '''
#         self.tmp_v4.set2(self).mul2(matrix)
#         self._values[:] = self.tmp_v4.values[0:3]
#         return self
# 
#     def prj(self, matrix):
#         '''
#         Project this vector to the `matrix` parameter.
#         It's just a multiplication followed by a division by w.
# 
# 
# 
#         *Parameters:*
# 
#         - `matrix`: `Matrix4`
#         '''
#         self.tmp_v4.set2(self).mul2(matrix).norw()
#         self._values[:] = self.tmp_v4.values[0:3]
# 
#     def set(self, x, y, z):
#         '''Set values of this vector
# 
#         *Parameters:*
# 
#         - `x`, `y`, `z`: `float`
#         '''
#         self._values[0] = x
#         self._values[1] = y
#         self._values[2] = z
# 
#     def set2(self, vector):
#         '''Set values of this vector
# 
#         *Parameters:*
# 
#         - `vector`: `Vector3`
#         '''
#         self.set(vector.x, vector.y, vector.z)


# Path: vulk/tests/math/bak_vector.py
from vulk.math.vector import Vector2
from vulk.math.vector import Vector3


    vector = Vector2(1, 2)
    for t in zip(vector, [1, 2]):
        assert t[0] == t[1]


def test_operations_vector3():
    # Add
    assert Vector3(1, 2, 3) + 2 == Vector3(3, 4, 5)
    assert Vector3(1, 2, 3) + (3, 2, 1) == Vector3(4, 4, 4)
    assert Vector3(1, 2, 3) + Vector3(3, 2, 1) == Vector3(4, 4, 4)

    # Sub
    assert Vector3(1, 2, 3) - 2 == Vector3(-1, 0, 1)
    assert Vector3(1, 2, 3) - (3, 2, 1) == Vector3(-2, 0, 2)
    assert Vector3(1, 2, 3) - Vector3(3, 2, 1) == Vector3(-2, 0, 2)

    # Mul
    assert Vector3(1, 2, 3) * 2 == Vector3(2, 4, 6)
    assert Vector3(1, 2, 3) * (3, 2, 1) == Vector3(3, 4, 3)
    assert Vector3(1, 2, 3) * Vector3(3, 2, 1) == Vector3(3, 4, 3)

    # Div
    assert Vector3(0, 2, 4) / 2 == Vector3(0, 1, 2)
    assert Vector3(0, 2, 4) / (3, 2, 1) == Vector3(0, 1, 4)
    assert Vector3(0, 2, 4) / Vector3(3, 2, 1) == Vector3(0, 1, 4)


def test_operations_vector2():
    # Add

    assert Vector2(1, 2) + 2 == Vector2(3, 4)