FloatingBodyTests: the tilt expectation is spelled from force and K, not read back from GetNormal

Two hand mutants of GetNormal's K (ignored; times 3) survived because the test compared the ship's
tilt with the same GetNormal it was testing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-15 05:40:10 +02:00
commit dd06f39dbc

View file

@ -217,7 +217,9 @@ public sealed class FloatingBodyTests : IDisposable
Assert.InRange(ship.Velocity.x, expected.x - tolerance, expected.x + tolerance);
Assert.InRange(ship.Velocity.y, expected.y - tolerance, expected.y + tolerance);
var normal = zone.GetNormal(at);
// The tilt is the surface of the drawn height (potential / K): its slope is the force over K.
var slope = zone.GetForce(at) / zone.Settings.HeightExaggeration;
var normal = normalize(float3(slope.x, 1f, slope.y));
var q = ship.Rotation;
var u = float3(q.x, q.y, q.z);
var v = float3(0, 1, 0);