From a524645a458210989fcfd508af55d48830553758 Mon Sep 17 00:00:00 2001 From: Erin Catto Date: Tue, 27 Aug 2024 22:20:17 -0700 Subject: [PATCH] test 5 --- samples/sample_determinism.cpp | 2 +- test/test_determinism.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/samples/sample_determinism.cpp b/samples/sample_determinism.cpp index c37b574d0..5b4a1c7e9 100644 --- a/samples/sample_determinism.cpp +++ b/samples/sample_determinism.cpp @@ -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 ); diff --git a/test/test_determinism.c b/test/test_determinism.c index bfa12a407..9c60a9801 100644 --- a/test/test_determinism.c +++ b/test/test_determinism.c @@ -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 ); @@ -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 );