From 4029aa799a5a3fcb392422f44ef2d08357fb128a Mon Sep 17 00:00:00 2001 From: nsensfel Date: Fri, 13 Apr 2018 18:31:35 +0200 Subject: Improves "noise" function. --- src/battlemap/src/View/Battlemap/Tile.elm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/battlemap/src/View/Battlemap/Tile.elm b/src/battlemap/src/View/Battlemap/Tile.elm index fb91731..2b526b2 100644 --- a/src/battlemap/src/View/Battlemap/Tile.elm +++ b/src/battlemap/src/View/Battlemap/Tile.elm @@ -18,7 +18,9 @@ import Struct.Tile -------------------------------------------------------------------------------- noise_function : Int -> Int -> Int -> Int noise_function a b c = - (round (pi * (radians (toFloat a)) * (radians (toFloat b)) * (toFloat c))) + (round + (radians (toFloat ((a + 1) * 2 + (b + 1) * 3 + c))) + ) -------------------------------------------------------------------------------- -- EXPORTED -------------------------------------------------------------------- -- cgit v1.2.3-70-g09d2