diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-20 09:48:35 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-20 09:48:35 +0400 |
commit | 436295026a5c1e4db22728e7a7efbe7bec1b229e (patch) | |
tree | 12601f0be359223135058562bf66d50044afff90 /source/blender/python/mathutils/mathutils_Matrix.h | |
parent | a8ed803b660410f408d31ca22e16109f8efbdae1 (diff) |
patch [#29662] Modifications to Mathutils Vectors for Consistency with Commit 42752
from Andrew Hale
Diffstat (limited to 'source/blender/python/mathutils/mathutils_Matrix.h')
-rw-r--r-- | source/blender/python/mathutils/mathutils_Matrix.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/python/mathutils/mathutils_Matrix.h b/source/blender/python/mathutils/mathutils_Matrix.h index 27dd4c48abf..91a276b648e 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.h +++ b/source/blender/python/mathutils/mathutils_Matrix.h @@ -41,17 +41,17 @@ extern PyTypeObject matrix_Type; /* matrix[row][col] == MATRIX_ITEM_INDEX(matrix, row, col) */ #ifdef DEBUG -# define MATRIX_ITEM_ASSERT(_mat, _row, _col) (BLI_assert(_row < (_mat)->num_col && _col < (_mat)->num_row)) +# define MATRIX_ITEM_ASSERT(_mat, _row, _col) (BLI_assert(_row < (_mat)->num_row && _col < (_mat)->num_col)) #else # define MATRIX_ITEM_ASSERT(_mat, _row, _col) (void)0 #endif -#define MATRIX_ITEM_INDEX(_mat, _row, _col) (MATRIX_ITEM_ASSERT(_mat, _row, _col),(((_mat)->num_row * (_row)) + (_col))) +#define MATRIX_ITEM_INDEX(_mat, _row, _col) (MATRIX_ITEM_ASSERT(_mat, _row, _col),(((_mat)->num_row * (_col)) + (_row))) #define MATRIX_ITEM_PTR( _mat, _row, _col) ((_mat)->matrix + MATRIX_ITEM_INDEX(_mat, _row, _col)) #define MATRIX_ITEM( _mat, _row, _col) ((_mat)->matrix [MATRIX_ITEM_INDEX(_mat, _row, _col)]) -#define MATRIX_ROW_INDEX(_mat, _row) (MATRIX_ITEM_INDEX(_mat, _row, 0)) -#define MATRIX_ROW_PTR( _mat, _row) ((_mat)->matrix + MATRIX_ROW_INDEX(_mat, _row)) +#define MATRIX_COL_INDEX(_mat, _col) (MATRIX_ITEM_INDEX(_mat, 0, _col)) +#define MATRIX_COL_PTR( _mat, _col) ((_mat)->matrix + MATRIX_COL_INDEX(_mat, _col)) typedef struct { BASE_MATH_MEMBERS(matrix); |