From 9eb8afcb59f40a1c3ec25fca51ecd9f73458d941 Mon Sep 17 00:00:00 2001 From: jbb01 <32650546+jbb01@users.noreply.github.com> Date: Mon, 12 Aug 2024 10:46:37 +0200 Subject: [PATCH] fix RGBUnboundedSpectrum --- .../raytracing/render/spectrum/RGBUnboundedSpectrum.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/jonahbauer/raytracing/render/spectrum/RGBUnboundedSpectrum.java b/src/main/java/eu/jonahbauer/raytracing/render/spectrum/RGBUnboundedSpectrum.java index 7946670..232c7fa 100644 --- a/src/main/java/eu/jonahbauer/raytracing/render/spectrum/RGBUnboundedSpectrum.java +++ b/src/main/java/eu/jonahbauer/raytracing/render/spectrum/RGBUnboundedSpectrum.java @@ -15,7 +15,7 @@ public final class RGBUnboundedSpectrum implements Spectrum { } var max = Math.max(rgb.r(), Math.max(rgb.g(), rgb.b())); this.scale = 2 * max; - this.polynomial = cs.toSpectrum(scale == 0 ? rgb.div(scale) : ColorRGB.BLACK); + this.polynomial = cs.toSpectrum(scale != 0 ? rgb.div(scale) : ColorRGB.BLACK); } @Override