style: fix inconsistency with other functions and indents

This commit is contained in:
Alex Murkoff 2024-12-13 21:39:04 +07:00
parent 4e81aed9a9
commit 0bd1d8ecf3

View File

@ -717,6 +717,8 @@ RMAPI float Vector3LengthSqr(const Vector3 v)
// Calculate two vectors dot product
RMAPI float Vector3DotProduct(Vector3 v1, Vector3 v2)
{
float result = 0.0f;
#if defined(__SSE2__) && defined(RL_USE_SIMD)
__m128 vecA = _mm_set_ps(0.0f, v1.z, v1.y, v1.x);
__m128 vecB = _mm_set_ps(0.0f, v2.z, v2.y, v2.x);
@ -730,10 +732,12 @@ RMAPI float Vector3DotProduct(Vector3 v1, Vector3 v2)
__m128 sum1 = _mm_add_ps(mul, _mm_shuffle_ps(mul, mul, _MM_SHUFFLE(2, 3, 0, 1)));
__m128 sum = _mm_add_ps(sum1, _mm_shuffle_ps(sum1, sum1, _MM_SHUFFLE(1, 0, 3, 2)));
#endif
return _mm_cvtss_f32(sum);
result = _mm_cvtss_f32(sum);
#else // Non SIMD
return v1.x*v2.x + v1.y*v2.y + v1.z*v2.z;
result = (v1.x*v2.x + v1.y*v2.y + v1.z*v2.z);
#endif
return result;
}
// Calculate distance between two vectors