diff --git a/libs/pcg/include/psemek/pcg/lazy_perlin.hpp b/libs/pcg/include/psemek/pcg/lazy_perlin.hpp index 39767702..c0f43f20 100644 --- a/libs/pcg/include/psemek/pcg/lazy_perlin.hpp +++ b/libs/pcg/include/psemek/pcg/lazy_perlin.hpp @@ -42,10 +42,10 @@ namespace psemek::pcg values[mask] = geom::dot(grid_at(ii), tt); } - auto smootherstep = [](float x0, float x1, float t) + auto smootherstep = [](T x0, T x1, T t) { - auto const s = t * t * t * (10. + t * (-15. + 6. * t)); - return x0 * (1 - s) + x1 * s; + auto const s = t * t * t * (T(10) + t * (-T(15) + T(6) * t)); + return x0 * (T(1) - s) + x1 * s; }; for (std::size_t i = N; i --> 0;)