Fix spinner test hitting assertion when spinning too fast

This commit is contained in:
Dean Herbert 2023-11-06 18:16:04 +09:00
parent f0f595ca40
commit aa6f14b024
No known key found for this signature in database
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
@ -153,7 +154,7 @@ protected override void Update()
{
base.Update();
if (auto)
RotationTracker.AddRotation((float)(Clock.ElapsedFrameTime * spinRate.Value));
RotationTracker.AddRotation((float)Math.Min(180, Clock.ElapsedFrameTime * spinRate.Value));
}
}
}