diff --git a/perlin.cpp b/perlin.cpp index 22b8de5e..f72a5feb 100644 --- a/perlin.cpp +++ b/perlin.cpp @@ -1,5 +1,6 @@ #include "perlin.hpp" +#include "lerp.hpp" #include "debug.hpp" #include "maths.hpp" @@ -7,25 +8,6 @@ #include -namespace lerp { - double - linear (double a, double b, double weight) { - check (weight >= 0 && weight <= 1.0); - return (1.0 - weight) * a + weight * b; - } - - - double - cosine (double a, double b, double weight) { - check (weight >= 0 && weight <= 1.0); - double ft = weight * PI; - double f = (1.0 - cos (ft)) * 0.5; - - return a * (1.0 - f) + b * f; - } -} - - // Just a random generator [-1.0, 1.0] static float generate (intmax_t x, intmax_t y) {