def test_is_close(array): vector = Vector(array) point = Point(array) assert point.size == vector.size assert point.is_close(vector) assert vector.is_close(point) assert point.is_close(array) assert vector.is_close(array)
def test_project_vector(vector_u, vector_v, vector_expected): """Test projecting vector u onto vector v.""" vector_u_projected = Vector(vector_v).project_vector(vector_u) assert vector_u_projected.is_close(vector_expected)