From e1dc54c8fc864d8af62f2fc8376a0678f159ebca Mon Sep 17 00:00:00 2001 From: Chris Blackbourn Date: Wed, 29 Jun 2022 11:18:34 +1200 Subject: Cleanup: Fix mul_v2_v2_ccw for repeated arguments (no functional changes) Prep for D15263 --- source/blender/blenlib/intern/math_vector_inline.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/blenlib/intern') diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c index 339bfb8f95e..3e9443dddb0 100644 --- a/source/blender/blenlib/intern/math_vector_inline.c +++ b/source/blender/blenlib/intern/math_vector_inline.c @@ -613,10 +613,10 @@ MINLINE void mul_v2_v2_cw(float r[2], const float mat[2], const float vec[2]) MINLINE void mul_v2_v2_ccw(float r[2], const float mat[2], const float vec[2]) { - BLI_assert(r != vec); - - r[0] = mat[0] * vec[0] + (-mat[1]) * vec[1]; - r[1] = mat[1] * vec[0] + (+mat[0]) * vec[1]; + float r0 = mat[0] * vec[0] + (-mat[1]) * vec[1]; + float r1 = mat[1] * vec[0] + (+mat[0]) * vec[1]; + r[0] = r0; + r[1] = r1; } MINLINE float mul_project_m4_v3_zfac(const float mat[4][4], const float co[3]) -- cgit v1.2.3