Skip to content

Commit

Permalink
test 3
Browse files Browse the repository at this point in the history
  • Loading branch information
erincatto committed Aug 28, 2024
1 parent e13bc93 commit 5220ca0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/math_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,9 @@ static inline float b2Atan( float x )

float b2Atan2( float y, float x )
{
return atan2f( y, x );

#if 0
float pi = b2_pi;
float halfPi = 0.5f * b2_pi;

Expand Down Expand Up @@ -488,6 +491,7 @@ float b2Atan2( float y, float x )
} // 4th quadrant

return res;
#endif
}

// https://en.wikipedia.org/wiki/Bh%C4%81skara_I%27s_sine_approximation_formula
Expand Down
8 changes: 5 additions & 3 deletions test/test_determinism.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,12 @@ static int CrossPlatformTest(void)
stepCount += 1;
}

// sleep step = 316, hash = 0xd9b31433
ENSURE( stepCount < maxSteps );
ENSURE( sleepStep == 316 );
ENSURE( hash == 0xd9b31433 );

// sleep step = 316, hash = 0xd9b31433
// sleep step = 375, hash = 0xdb765ba8
ENSURE( sleepStep == 375 );
ENSURE( hash == 0xdb765ba8 );

free( bodies );

Expand Down

0 comments on commit 5220ca0

Please sign in to comment.