Skip to content

Commit

Permalink
Fixed vec3 constructor (#44)
Browse files Browse the repository at this point in the history
Fixed #43
  • Loading branch information
Zuzu-Typ authored Nov 7, 2019
1 parent ea756b0 commit 6866cc8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PyGLM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15819,7 +15819,7 @@ vec3_init(vec<3, T> *self, PyObject *args, PyObject *kwds)
PyErr_SetString(PyExc_TypeError, "invalid argument type(s) for vec3()");
return -1;
}
self->super_type = glm::vec3(PyGLM_Number_FromPyObject<T>(arg1), o);
self->super_type = glm::vec<3, T>(PyGLM_Number_FromPyObject<T>(arg1), o);
return 0;
}
if (PyGLM_Number_Check(arg2)) {
Expand All @@ -15828,14 +15828,14 @@ vec3_init(vec<3, T> *self, PyObject *args, PyObject *kwds)
PyErr_SetString(PyExc_TypeError, "invalid argument type(s) for vec3()");
return -1;
}
self->super_type = glm::vec3(o, PyGLM_Number_FromPyObject<T>(arg2));
self->super_type = glm::vec<3, T>(o, PyGLM_Number_FromPyObject<T>(arg2));
return 0;
}
PyErr_SetString(PyExc_TypeError, "invalid argument type(s) for vec3()");
return -1;
}
if (PyGLM_Number_Check(arg1) && PyGLM_Number_Check(arg2) && PyGLM_Number_Check(arg3)) {
self->super_type = glm::vec3(PyGLM_Number_FromPyObject<T>(arg1), PyGLM_Number_FromPyObject<T>(arg2), PyGLM_Number_FromPyObject<T>(arg3));
self->super_type = glm::vec<3, T>(PyGLM_Number_FromPyObject<T>(arg1), PyGLM_Number_FromPyObject<T>(arg2), PyGLM_Number_FromPyObject<T>(arg3));
return 0;
}
}
Expand Down

0 comments on commit 6866cc8

Please sign in to comment.