patch: [#29382] Arbitrary Length Array Function Additions and Modifications

from Andrew Hale (trumanblending), with some edits to use these in mathutils.Vector added.

Added Functions:
- dot_vn_vn - Dot product of two arrays
- normalize_vn_vn - Normalize an array and store the result in a second array
- normalize_vn - Normalize an array inplace

Renamed Functions:
Some functions have been renamed to make them consistent with the naming conventions used by fixed length array functions.
- fill_vni to fill_vn_i
- fill_vn to fill_vn_fl
This commit is contained in:
2011-11-24 04:12:16 +00:00
parent f94614d791
commit c62d33c540
7 changed files with 55 additions and 54 deletions

View File

@@ -1223,7 +1223,7 @@ PyDoc_STRVAR(Matrix_zero_doc,
);
static PyObject *Matrix_zero(MatrixObject *self)
{
fill_vn(self->contigPtr, self->row_size * self->col_size, 0.0f);
fill_vn_fl(self->contigPtr, self->row_size * self->col_size, 0.0f);
if (BaseMath_WriteCallback(self) == -1)
return NULL;