From 6c53dac3c54736c121c8aa75abb1cb344e3732ea Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 16 Oct 2026 21:34:34 +0200 Subject: [PATCH] PotentialOwnerTests: the gradient check allows the height's float32 resolution on flat ground between subzones Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/PotentialOwnerTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Aetheria.Shared.Tests/PotentialOwnerTests.cs b/tests/Aetheria.Shared.Tests/PotentialOwnerTests.cs index cf95fde3b..5768fc0f0 100644 --- a/tests/Aetheria.Shared.Tests/PotentialOwnerTests.cs +++ b/tests/Aetheria.Shared.Tests/PotentialOwnerTests.cs @@ -306,7 +306,7 @@ public sealed class PotentialOwnerTests : IDisposable (two.GetHeight(p + float2(step, 0)) - two.GetHeight(p - float2(step, 0))) * k / (2 * step), (two.GetHeight(p + float2(0, step)) - two.GetHeight(p - float2(0, step))) * k / (2 * step)); var force = two.GetForce(p); - Assert.InRange(length(gradient + force), 0f, length(force) * 1e-2f + 1e-4f); + Assert.InRange(length(gradient + force), 0f, length(force) * 1e-2f + 1e-4f + 3e-5f * k); // flat ground between the subzones reads the float32 resolution of the height, times K } } }