Skip to content

Commit

Permalink
removed custom error
Browse files Browse the repository at this point in the history
  • Loading branch information
bilhox committed Oct 20, 2024
1 parent c4a0ff0 commit 1450727
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src_c/math.c
Original file line number Diff line number Diff line change
Expand Up @@ -2203,14 +2203,7 @@ vector2_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *
vector2_complex(pgVector *self, PyObject *_null)
{
PyObject *complex =
PyComplex_FromDoubles(self->coords[0], self->coords[1]);

if (complex == NULL) {
RAISE(PyExc_ValueError, "Couldn't build complex number from Vector2");
}

return complex;
return PyComplex_FromDoubles(self->coords[0], self->coords[1]);
}

static int
Expand Down

0 comments on commit 1450727

Please sign in to comment.