mathutils: support for to_2x2 as well as non-square matrices

This commit is contained in:
2020-02-20 15:09:44 +11:00
parent bc86eb1780
commit 1e3ffd1f87
3 changed files with 81 additions and 32 deletions

View File

@@ -3236,14 +3236,14 @@ PyObject *Vector_CreatePyObject_cb(PyObject *cb_user,
}
/**
* \param vec: Initialized vector value to use in-place, allocated with: PyMem_Malloc
* \param vec: Initialized vector value to use in-place, allocated with #PyMem_Malloc
*/
PyObject *Vector_CreatePyObject_alloc(float *vec, const int size, PyTypeObject *base_type)
{
VectorObject *self;
self = (VectorObject *)Vector_CreatePyObject_wrap(vec, size, base_type);
if (self) {
self->flag = BASE_MATH_FLAG_DEFAULT;
self->flag &= ~BASE_MATH_FLAG_IS_WRAP;
}
return (PyObject *)self;