TurnIsClampedToOne: compare against the starting heading, not the hull's own
The reference-turn assertion measured the angle between the hull and itself. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b0d7ccb4f8
commit
6833f5aa7f
1 changed files with 2 additions and 1 deletions
|
|
@ -244,6 +244,7 @@ public sealed class SteeringTests
|
|||
var three = RestoredHullsTests.BuildThrustedShip(cache, Hull);
|
||||
var minusOne = RestoredHullsTests.BuildThrustedShip(cache, Hull);
|
||||
var minusThree = RestoredHullsTests.BuildThrustedShip(cache, Hull);
|
||||
var start = one.Direction;
|
||||
|
||||
one.Turn = 1;
|
||||
three.Turn = 3;
|
||||
|
|
@ -257,7 +258,7 @@ public sealed class SteeringTests
|
|||
minusThree.Update(1f / 60f);
|
||||
}
|
||||
|
||||
Assert.True(Angle(one.Direction, Heading(one, 0f)) > radians(.05f), "the reference turn is real");
|
||||
Assert.True(Angle(start, one.Direction) > radians(.02f), "the reference turn is real");
|
||||
Assert.True(Angle(one.Direction, three.Direction) < radians(.001f), $"{Angle(one.Direction, three.Direction)}");
|
||||
Assert.True(Angle(minusOne.Direction, minusThree.Direction) < radians(.001f));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue