From e13bc9300064c35cd158f44e16107cc8adc5b428 Mon Sep 17 00:00:00 2001 From: Erin Catto Date: Tue, 27 Aug 2024 21:12:28 -0700 Subject: [PATCH] test 02 --- include/box2d/math_functions.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/box2d/math_functions.h b/include/box2d/math_functions.h index acb30ecb6..002378635 100644 --- a/include/box2d/math_functions.h +++ b/include/box2d/math_functions.h @@ -249,16 +249,16 @@ B2_INLINE b2Vec2 b2Clamp( b2Vec2 v, b2Vec2 a, b2Vec2 b ) #if 1 B2_INLINE float b2Sqrt( float x ) { - //return sqrtf( x ); - -#if defined( B2_SIMD_AVX2 ) || defined( B2_SIMD_SSE2 ) - return _mm_cvtss_f32( _mm_sqrt_ss( _mm_set1_ps( x ) ) ); -#elif defined( B2_SIMD_NEON ) - float32x4_t v = vdupq_n_f32( x ); - return vgetq_lane_f32( vsqrtq_f32( v ), 0 ); -#else return sqrtf( x ); -#endif + +//#if defined( B2_SIMD_AVX2 ) || defined( B2_SIMD_SSE2 ) +// return _mm_cvtss_f32( _mm_sqrt_ss( _mm_set1_ps( x ) ) ); +//#elif defined( B2_SIMD_NEON ) +// float32x4_t v = vdupq_n_f32( x ); +// return vgetq_lane_f32( vsqrtq_f32( v ), 0 ); +//#else +// return sqrtf( x ); +//#endif } B2_INLINE float b2Length( b2Vec2 v )