From b26849e689f4c49882cd7d83c6b06aa785dd844e Mon Sep 17 00:00:00 2001 From: lisyarus Date: Wed, 20 Mar 2024 20:57:17 +0300 Subject: [PATCH] Minor pcg::lazy_perlin fix --- libs/pcg/include/psemek/pcg/lazy_perlin.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;)