Skip to content

Instantly share code, notes, and snippets.

@urnenfeld
Created August 8, 2020 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save urnenfeld/3bd30cadca91e00cc146b12a83783fc3 to your computer and use it in GitHub Desktop.
Save urnenfeld/3bd30cadca91e00cc146b12a83783fc3 to your computer and use it in GitHub Desktop.
Perlin noise implementation deprecation
diff --git a/example.cpp b/example.cpp
index 78d7993..d0e5508 100644
--- a/example.cpp
+++ b/example.cpp
@@ -151,20 +151,20 @@ void Test()
perlinA.serialize(state);
perlinB.deserialize(state);
- assert(perlinA.octaveNoise(0.1, 0.2, 0.3, 4)
- == perlinB.octaveNoise(0.1, 0.2, 0.3, 4));
+ assert(perlinA.accumulatedOctaveNoise3D(0.1, 0.2, 0.3, 4)
+ == perlinB.accumulatedOctaveNoise3D(0.1, 0.2, 0.3, 4));
perlinA.reseed(1234);
perlinB.reseed(1234);
- assert(perlinA.octaveNoise(0.1, 0.2, 0.3, 4)
- == perlinB.octaveNoise(0.1, 0.2, 0.3, 4));
+ assert(perlinA.accumulatedOctaveNoise3D(0.1, 0.2, 0.3, 4)
+ == perlinB.accumulatedOctaveNoise3D(0.1, 0.2, 0.3, 4));
perlinA.reseed(std::mt19937{ 1234 });
perlinB.reseed(std::mt19937{ 1234 });
- assert(perlinA.octaveNoise(0.1, 0.2, 0.3, 4)
- == perlinB.octaveNoise(0.1, 0.2, 0.3, 4));
+ assert(perlinA.accumulatedOctaveNoise3D(0.1, 0.2, 0.3, 4)
+ == perlinB.accumulatedOctaveNoise3D(0.1, 0.2, 0.3, 4));
}
int main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment