From 4c299de64faa964003d9bb14b7bee84f10c4f9e0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tomas=20Wenstr=C3=B6m?= Date: Thu, 24 Aug 2017 22:12:13 +0200 Subject: [PATCH] Another adjustment to 'under the sea' --- src/kaka/cakelight/AmbientMode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kaka/cakelight/AmbientMode.java b/src/kaka/cakelight/AmbientMode.java index 29a861c..2b10e31 100644 --- a/src/kaka/cakelight/AmbientMode.java +++ b/src/kaka/cakelight/AmbientMode.java @@ -65,7 +65,7 @@ public class AmbientMode extends Mode { // TODO split into DynamicAmbient and St double x = frame.xOf(i); double y = frame.yOf(i); double b = Math.pow(Math.min(1, Math.max(0, noise.getr(0.0, 1.0, 1, x, y, time / 7000.0))), 1.5); - double g = Math.min(b, Math.max(0, noise.getr(-1.0, 1.0, 0.5, x*3, y*3, time / 5000.0))); + double g = Math.min(1, Math.max(0, noise.getr(-b, b, 0.5, x*3, y*3, time / 5000.0))); frame.setLedColor(i, Color.rgb(0, g, b)); } } else if (type == 2) { -- 2.11.0