diff --git a/libretro-common/gfx/math/matrix_3x3.c b/libretro-common/gfx/math/matrix_3x3.c index f5d88f0d85..a4bb723034 100644 --- a/libretro-common/gfx/math/matrix_3x3.c +++ b/libretro-common/gfx/math/matrix_3x3.c @@ -24,8 +24,10 @@ #include #include -#define floats_are_equal(x, y) (fabs(x - y) <= 0.00001f * ((x) > (y) ? (y) : (x))) -#define float_is_zero(x) (floats_are_equal((x) + 1, 1)) +#define floats_are_equal(x, y) (fabs(x - y) <= 0.00001f * ((x) > (y) ? (y) : (x))) +#define float_is_zero(x) (floats_are_equal((x) + 1, 1)) + +#define MAT_ELEM_3X3(mat, r, c) ((mat).data[3 * (r) + (c)]) void matrix_3x3_identity(math_matrix_3x3 *mat) { diff --git a/libretro-common/gfx/math/matrix_4x4.c b/libretro-common/gfx/math/matrix_4x4.c index 8b557074d1..42604d069d 100644 --- a/libretro-common/gfx/math/matrix_4x4.c +++ b/libretro-common/gfx/math/matrix_4x4.c @@ -26,6 +26,8 @@ #include #include +#define MAT_ELEM_4X4(mat, r, c) ((mat).data[4 * (c) + (r)]) + void matrix_4x4_copy(math_matrix_4x4 *dst, const math_matrix_4x4 *src) { unsigned i, j; diff --git a/libretro-common/include/gfx/math/matrix_3x3.h b/libretro-common/include/gfx/math/matrix_3x3.h index f3819b6e06..216b171930 100644 --- a/libretro-common/include/gfx/math/matrix_3x3.h +++ b/libretro-common/include/gfx/math/matrix_3x3.h @@ -30,8 +30,6 @@ typedef struct math_matrix_3x3 float data[9]; } math_matrix_3x3; -#define MAT_ELEM_3X3(mat, r, c) ((mat).data[3 * (r) + (c)]) - void matrix_3x3_inits(math_matrix_3x3 *mat, const float n11, const float n12, const float n13, const float n21, const float n22, const float n23, diff --git a/libretro-common/include/gfx/math/matrix_4x4.h b/libretro-common/include/gfx/math/matrix_4x4.h index aab05c2644..7bdece8b8b 100644 --- a/libretro-common/include/gfx/math/matrix_4x4.h +++ b/libretro-common/include/gfx/math/matrix_4x4.h @@ -33,8 +33,6 @@ typedef struct math_matrix_4x4 float data[16]; } math_matrix_4x4; -#define MAT_ELEM_4X4(mat, r, c) ((mat).data[4 * (c) + (r)]) - void matrix_4x4_copy(math_matrix_4x4 *dst, const math_matrix_4x4 *src); void matrix_4x4_identity(math_matrix_4x4 *mat); void matrix_4x4_transpose(math_matrix_4x4 *out, const math_matrix_4x4 *in);