From 755172b3248bf778b468650871fb609e2b7ddd4d Mon Sep 17 00:00:00 2001 From: routersys Date: Sun, 25 Oct 2026 09:54:30 +0900 Subject: [PATCH] =?UTF-8?q?=E6=95=A3=E4=B9=B1=E3=81=AE=E8=A1=A8=E3=81=AE?= =?UTF-8?q?=E5=85=A8=E3=81=A6=E3=81=AE=E8=A1=8C=E3=81=AE=E8=A9=A6=E9=A8=93?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Halo.Tests/HaloTableTests.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Halo.Tests/HaloTableTests.cs b/Halo.Tests/HaloTableTests.cs index bb608c9..ba2e6ed 100644 --- a/Halo.Tests/HaloTableTests.cs +++ b/Halo.Tests/HaloTableTests.cs @@ -344,6 +344,20 @@ public sealed class HaloTableTests Assert.Equal(middle, Value(texels, 100 * ScatterGrid.Width + 300, 1), middle * 0.01f); } + [Theory] + [InlineData(0.0)] + [InlineData(2.0)] + public void EveryRowOfTheScatterTableIsComposed(double diameter) + { + const int margin = 30; + var texels = HaloTable.ComposeScatter(Filled(0.01), Empty(), 1.0, 0.0, 20.0, diameter, 1.0); + var middle = Value(texels, 133 * ScatterGrid.Width + 300, 1); + + Assert.True(middle > 0f); + Assert.All(Enumerable.Range(margin * ScatterGrid.Width, (ScatterGrid.Height - 2 * margin) * ScatterGrid.Width), texel => + Assert.Equal(middle, Value(texels, texel, 1), middle * 0.01f)); + } + [Fact] public void ALightOnTheAzimuthEdgeIsReflectedIntoTheNeighbouringTexel() {