-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hi, first of all thank you for this class, it is truly amazing.
I use it to generate the world for my game.
Problem:
When x or y or both are negative values, the output of the nosie2D function becomes very weird and fragmented.
Solution:
In public function interpolatedNoise($x, $y)
change lines 102 and 105 like this:
102: $integerX = (int) floor($x);
205: $integerY = (int) floor($y);
The floor() function did the trick here. Positive values remain unchanged in my tests, while negative values now produce the same nice results!
Cheers, Holo
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels