Skip to content

Commit

Permalink
test 5
Browse files Browse the repository at this point in the history
  • Loading branch information
erincatto committed Aug 28, 2024
1 parent 19119e2 commit a524645
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion samples/sample_determinism.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class FallingHinges : public Sample
bodyDef.position.y = h + 2.0f * h * i;

// this tests the deterministic cosine and sine functions
bodyDef.rotation = b2MakeRot( 0.01f * i - 0.1f );
bodyDef.rotation = b2MakeRot( 0.1f * i - 1.0f );

b2BodyId bodyId = b2CreateBody( m_worldId, &bodyDef );

Expand Down
7 changes: 4 additions & 3 deletions test/test_determinism.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ static int CrossPlatformTest(void)
bodyDef.position.y = h + 2.0f * h * i;

// this tests the deterministic cosine and sine functions
bodyDef.rotation = b2MakeRot( 0.01f * i - 0.1f );
bodyDef.rotation = b2MakeRot( 0.1f * i - 1.0f );

b2BodyId bodyId = b2CreateBody( worldId, &bodyDef );

Expand Down Expand Up @@ -334,8 +334,9 @@ static int CrossPlatformTest(void)
// sleep step = 316, hash = 0xd9b31433
// sleep step = 375, hash = 0xdb765ba8
// sleep step = 365, hash = 0x27d8846a
ENSURE( sleepStep == 365 );
ENSURE( hash == 0x27d8846a );
// sleep step = 262, hash = 0x68d7c48b
ENSURE( sleepStep == 262 );
ENSURE( hash == 0x68d7c48b );

free( bodies );

Expand Down

0 comments on commit a524645

Please sign in to comment.