fix(editor): round the colour temperature to tens without a negative digit count

double.Round(x, -1) throws, so opening any analysed sequence with a white
balance range failed in the Exposure tab's constructor and the editor never
appeared.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-03 11:10:10 +00:00
1 parent ce44fc553a
commit 90321a7e53
2 files changed
+12 -1

No files matched your search

@@ -11,6 +11,14 @@ public sealed class EditorTextTests
{
static EditorTextTests() => _ = EditorFixture.Sunset;
[Test]
public void ColourTemperatureShowsToTheNearestTen()
{
Assert.Equal(5560.0, ExposureTab.RoundToTens(5557.2));
Assert.Equal(3200.0, ExposureTab.RoundToTens(3203.9));
Assert.Equal(12_000.0, ExposureTab.RoundToTens(11_998));
}
[Test]
public void OptimiseReportsValuesAsTheControlsShowThem()
{